| | |
Help with Memory Hogging
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Sep 2006
Posts: 23
Reputation:
Solved Threads: 0
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.
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.
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.
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.
I don't accept change; I don't deserve to live.
![]() |
Similar Threads
- ram on vista (Windows Vista and Windows 7)
- 3D shopping website design (IT Professionals' Lounge)
- possible memory killer...need info (Windows 95 / 98 / Me)
- Whats wrong with my computer??? (Viruses, Spyware and other Nasties)
- Not enough Memory (Windows NT / 2000 / XP)
- Internet Explorer Running SLOW (Web Browsers)
- Memory Managers (Windows 95 / 98 / Me)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: VB6 & Access (user name, network printer, reminders)
- Next Thread: want to learn vb6
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






