|
-
Feb 10th, 2000, 06:23 AM
#1
Thread Starter
Junior Member
I know if I create an object with the new keyword I must set it to nothing when I'm done with it.
I have written a program that reads from a flat ASCII file and writes to a FoxPro database. This program uses ado for file manipulation.
This progam works on a timer and is set to run every 5 seconds. Each time it processes records the memory usage goes up. Eventually the program gets out of memory errors.
Is there anything else besides objects that need to be set to nothing? I am not using arrays but have a few Global variables and a user defined type which acts as a record set for the ASCII file.
For example:
Global ExportFile as Export
Type Export {
name as string
age as integer
ssn as string
}
When I use it, I do something like this
ExportFile.name = stName
or
rs.fields("Name").value = ExportFile.name
-
Feb 10th, 2000, 06:54 AM
#2
You don't need worry about variables. You do need to worry about any object you create, including forms (by loading them) and recordsets. Both should be set to Nothing.
------------------
Marty
What did the fish say when it hit the concrete wall?
> > > > > "Dam!"
-
Feb 10th, 2000, 07:18 AM
#3
Frenzied Member
Sounds like you're not setting your recordset object to nothing when you finish with it...
-
Feb 10th, 2000, 09:04 AM
#4
Hyperactive Member
Hi,
This sounds very similar to a problem I had when pulling data from our mainframe's database. After about 30 records were retrieved my system would hang up. Using the resource meter I saw the memory drop after each retrieval.
Putting a DoEvents after each record retrieval solved this.
Al.
------------------
A computer is a tool, not a toy.
<A HREF="mailto:[email protected]
[email protected]">[email protected]
[email protected]</A>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|