[Mono-devel-list] GC with Pixbufs
chris at chrisseaton.com
Mon Mar 15 15:55:46 EST 2004
>>I have a program that generates thumbnails of images for web pages.
>>Creating a thumbnail simply involves reading the file into a Pixbuf
>>image, scaling it into a new Pixbuf and saving it.
>>Mono doesn't seem to ever GC these Pixbufs. They are only referenced
>>from local variables in functions when the thumbnail is being created so
>>I'm sure they're elligible for deallocation.
> You should use the explicit Dispose method of Pixbuf in these cases
> (since you are using an unmanaged resource that the managed world has no
> idea what it is).
I'm calling Dispose for both bitmaps, but mono continues to leak memory
when creating these thumbnails. I've attatched the modified source file.
I am using Dispose correctly, aren't I?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Mono-devel-list