|
-
Feb 21st, 2007, 04:39 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] [2005] Using .Dispose on a Bitmap class
My class has a .ToBitmap method to make it easy for a control to visualize its content. Because the data has to be down-sampled before it can be converted to a bitmap, the new bitmap is not attached to the data, rather I for...next through it to set the bits in an array that the bitmap is attached to.
Long story short, the .ToBitmap method returns a new bitmap object each time.
I understand that it is common courtesy for the garbage collector to call the .Dispose method of the bitmap once I'm done with it, but what if I don't?
Does the garbage collector call .Dispose for me if I forget? Will I end up with a memory leak until the GC runs?
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
|