-
Managing Bitmaps
I have 6 bitmaps, all the same size. Their ImageFormat is Format32bppPArgb. Sometimes when I try to resize the bitmaps I get the Out of Memory message. This doesn't happen all the time, only after about six or seven resizes.
In Task Manager, the program's memory use never goes above 800k.
So, a couple questions:
Is there a way to resize a Bitmap without creating a new one?
If I have to recreate the Bitmap, do I need to dispose the current one (or set it to Nothing)?
Thanks.
-
Re: Managing Bitmaps
to be sure you use the minimum resources possible, dispose the old bitmap, then call GC.Collect
-
Re: Managing Bitmaps
Ok, thanks.
Also, why am I even getting the Out of Memory error when I still have at least 4GB of memory available?