|
-
Nov 29th, 2000, 07:00 AM
#1
Thread Starter
Hyperactive Member
hi,
I am developing a project which uses one Midform with lots of child forms in it. Those have lots of images and controls inside them.
I read earlier that memory would not be freed up when I unload any of the child forms inside the MDiform unless I close the whole program..!! is that right??
so if I have 10 Mdi child forms in my application.. (unloading one before loading the next).. would make no difference. and would take up memeory for all 10 of them??
anyone please comment on this...
is that right? if so any solutions? why?
thanks a lot!
Abdul
1+1=3
make life simple, use a calculator!
-
Nov 29th, 2000, 08:53 AM
#2
Fanatic Member
As far as I know, the memory is relaesed when the parent form is closed. This is not necessarily the same as the App closing.
Cheers,
P.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 29th, 2000, 09:25 AM
#3
Thread Starter
Hyperactive Member
re:
but what if the whole app is a parent Mdi?
my app launches one Mdi, which everything is done in it.. i.e one parent Mdi with a bunch of child forms in it..
would that mean my app will take as much memory as the amount of child forms have?? (as I understand now that even if I unload those childs they still dont release the momory! thus the more child forms that are loaded the more memory used up EVEN if the prevous child is unloaded).
any idea? anyone?
thanks again
Abdul
1+1=3
make life simple, use a calculator!
-
Nov 29th, 2000, 09:45 AM
#4
Fanatic Member
I use to set my child forms to nothing before I unload them.
Code:
Sub Form1_Unload
Set Form1 = Nothing
Unload Me
End Sub
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
-
Nov 29th, 2000, 10:00 AM
#5
Thread Starter
Hyperactive Member
re:
I dont know if that would work... can you do that in design time? it does not seem to change the form form child to normal.
have you been succesfull though? (in releasing/freeing up memeory by this method)
any thoughts?
thanks
Abdul
1+1=3
make life simple, use a calculator!
-
Nov 29th, 2000, 10:04 AM
#6
-
Nov 29th, 2000, 10:09 AM
#7
Thread Starter
Hyperactive Member
re:
thanks.. I dont have any objects in within any for the child forms that depend on any other (if you see what I mean).
When you used this method (adding the set form1 = nothing before any unload me statement) was there any visual difference? I found no difference in how it closed.. (I was expencting some sort of flicker or maybe some indication that the form was changed from child to normal then unloaded..).. how did you test it to see that it did accualy free memory? did it not free memeroy before you added that line of code before the unload me instruction?
thanks a lot!
Abdul
1+1=3
make life simple, use a calculator!
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
|