944,066 Members | Top Members by Rank

Ad:
Jan 18th, 2007
0

Help with Memory Hogging

Expand Post »
I am using VB6 and have a form that is loaded by user action during normal programme execution.

There are several Variables (Strings) declared in the General Declaration of the form.

When the user has completed the task the form is then Unloaded. If the user then selects the option that requires this from to be Loaded again, if I check these variables at the Form.Load stage they still retain the values that were present when the form was last loaded.

I thought that memory space was released when a Form is UnLoaded and hence the values held by these variables would be erased.

I am wrong in this assumption or is there something I need to do to a) release the memory and b) erase the values held in the form. or is it c) a "feature" of working in the design environment ?

Thanking you all in advance for your help.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
JohnKelly is offline Offline
26 posts
since Sep 2006
Jan 19th, 2007
0

Re: Help with Memory Hogging

VB deftly handles the memory mangagement on part of the programmer, you need not worry about it. The garbage collector of VB spots the variables which have gone out of scope or are not referenced anywhere in the program and takes care of them accordingly.

And btw, as far as the variables of the form retaining their values is concerned, I guess its a Feature of working in the design environment, though I am not sure about it.
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB6 & Access (user name, network printer, reminders)
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: want to learn vb6





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC