qt-jambi-interest  

Re: [Qt-jambi-interest] Memory Leaks - any updates?

Curt Nowak
Mon, 01 Dec 2008 02:34:15 -0800

Hi Gunnar,
 
you're right, my bad. Even though jconsole does perform a major 
"MarkSweepCompact" GC before creating the dump file I was mistaken to believe 
it would catch every unused reference. So I ran the GC a couple of times before 
I created the dump file (knowingly that this is an anti-pattern as well). It 
turns out I was chasing ghosts: Invoking dispose() on my toplevel widgets does 
indeed suffice.
 
Thanks for your patience :-)
 
Curt

 
________________________________

Von: Gunnar Sletta [EMAIL PROTECTED]
Gesendet: Mo 01.12.2008 11:02
An: Curt Nowak
Cc: qt-jambi-interest@trolltech.com
Betreff: Re: AW: AW: [Qt-jambi-interest] Memory Leaks - any updates?



You're counting java references, we have no control over these as GC
will collect them. dispose() will delete the C++ part of the object and
leave the java part dead for the gc to collect. dispose() will also
delete all C++ objects in the child hierarchy, leaving the buttons and
connections etc free for collection too. When the GC does so is
completely out of our control. The fact that you see fewer instances
than what you created indicates that GC collected some but not all yet.



_______________________________________________
Qt-jambi-interest mailing list
Qt-jambi-interest@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest