|
-
November 1st, 1998, 07:52 AM
#1
Unloading Forms
I've noticed with VB that you can unload a form, for example, MyForm.Unload, and the form, MyForm does not really unload from memory. Is there any other way to unload or destroy the Form object in VB.
Gordito
-
November 1st, 1998, 11:19 PM
#2
Re: Unloading Forms
When you unload a form, it removes it from memory, when you hide a form, it is still in memory just not visible.
-
November 7th, 1998, 07:07 PM
#3
Re: Unloading Forms
In theory, you are correct Justin, but that was not my question. I know unload is supposed to unload a form from memory ... but from my experience it does not completely take the form out of memory. Has anyone else noticed this behavior?
Gordito
-
November 7th, 1998, 09:12 PM
#4
Re: Unloading Forms
Why do you think that unloading a form does not take it out of memory?
-
November 10th, 1998, 06:11 AM
#5
Re: Unloading Forms
I'm sure last time I looked at this, I found that the unload command does not always unload them from memory, or at least the memory is not reclaimed. I had some very large forms, and I examined the memory usuage of the application before, during and after using the form. It did not drop when the form was 'unloaded'. Somebody explained to me, that it's a trick of VB so that it does not have to reload the form if you want to show it again. The system only unloads them proper if it's running low on memory or you explicietly tell it to unload (I forget how)
-
November 11th, 1998, 03:21 AM
#6
Re: Unloading Forms
There's an API call something like KillWindow. This will free it definitely (and you can't call it again in your app).
But, you'll probably not notice it, but lots of programs doesnot free memory when forms are unloaded. Indeed, VB does some memory tricks, but I think not only VB does that... I found out that Borland C++ Builder does the same trick sometimes. And besides that, Windows does not always free the memory directly.
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
|