|
-
Jun 12th, 2008, 04:05 PM
#6
Re: Memory Management and the Garbage Collector
It can theoretically be reclaimed right after the click, but the garbage collector will run when it wants to. Even .Dispose() doesn't call the GC immediately, it marks it for disposal for the next time the GC comes by. If the GC comes by and deems the object suitable for disposal, it will.
Don't know if you've read this yet
http://msdn.microsoft.com/en-us/library/0xy59wtx.aspx
References to an object mean that it won't be collected. Alright, so if Form2 isn't owned by Form1, the fact that it exists means that it's still being referenced.
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
|