MDK | 27 Aug 01:33
Picon

Re: DIVA report #9

On 8/26/05, miguel de icaza <miguel.de.icaza <at> gmail.com> wrote:


        * I need to investigate into Mono.Cairo. It seems there are
some huge memory leaks. After a few dozen of GUI redrawing iterations
the memory usage goes to 500MB... sigh. This is even though I call all
the IDisposable methods manually, so I suppose it has something to do
with resources being lost in Graphics.Save / Restore.

It is possible that Mono.Cairo is not correctly releasing its resources, I would not be surprised.

Well, it's calling the unmanaged *_destroy functions, so It should work. Also, if I disable all the drawing code (and leave only the Create/Dispose functions) it behaves as expected -- memory goes up and at some point GC kicks in and it gets freed.

Judging by the size of the leak, it seems that the whole areas of pixel memory are leaking.


--
Michał Dominik K.
michaldominik <at> gmail.com
www.mdk.org.pl
miguel de icaza | 27 Aug 18:53
Picon

Re: DIVA report #9

Hello,

Hisham, can you weight in?

Well, it's calling the unmanaged *_destroy functions, so It should work. Also, if I disable all the drawing code (and leave only the Create/Dispose functions) it behaves as expected -- memory goes up and at some point GC kicks in and it gets freed.

I think we need to audit Mono.Cairo, if memory gets released during a GC it means that the release is happening not by calling IDisposable's method but its being called by the finalizers (which will run on a separate thread). 

So am not getting a very warm feeling about this.

Judging by the size of the leak, it seems that the whole areas of pixel memory are leaking.



Gmane