|
-
Oct 28th, 2002, 11:37 AM
#1
Thread Starter
Hyperactive Member
Free all memory from program?
I am working on a program that is memory-intensive, and although I will be going through trying to make it as effecient as possible, I believe it will still use a lot. It will need the ability to restart, and therefore *basically* perform the same thing with different data again.
Is there anyway I can "clear" all data from the memory currently associated with the program, or ANYTHING that would help me out... thanks!
-
Oct 28th, 2002, 11:46 AM
#2
PowerPoster
Well
This is somewhat vague...
Are you using arrays?
Unload All Form when Exiting program
VB Code:
Dim Frm as Form
For Each Frm in Forms
Unload Frm
Set Frm=Nothing
Next
End
Are you using connections and recordsets (databases access)
VB Code:
Rst.Close
Cnn.Close
Set Rst = Nothing
Set Cnn = Nothing
Wher rst is your recordset object, and cnn is your connection string object...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Oct 28th, 2002, 11:53 AM
#3
Thread Starter
Hyperactive Member
Actually, it is a module that has rougly 25+ variables, is there anyway I could, in theory "erase" the module then reload it?
Thanks for your help so far, it has gotten me someway...
-
Oct 28th, 2002, 12:02 PM
#4
Frenzied Member
Re: Well
Originally posted by James Stanich
Are you using arrays?
Just wondering..
I split my "Retrieved Data" from a "Winsock1" control, into:
DataArray()
I Can get rid of everything in "DataArray()" by:
VB Code:
Erase DataArray()
' OR
Erase DataArray(0) ' (1) (2) ETC
, And you have to close record sets too, before you:
?
: Learn something everysecond here huh
-
Oct 28th, 2002, 12:04 PM
#5
Thread Starter
Hyperactive Member
Nice to know... but does anyone have any info on how I can like quickly erase 25+ variables from the ram!?
-
Oct 28th, 2002, 12:11 PM
#6
PowerPoster
Well
Are the global variables, form level, or procedure level?
Seeting frm = Nothing should release from and procedure level. Globals I never could get confirmation on how to perform, so I used arrays whenever possible...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Oct 28th, 2002, 03:22 PM
#7
Thread Starter
Hyperactive Member
I have variables on different scopes, I just want to free up as much ram as possible whenever possible.
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
|