Is there any utility that indicates in a comprehensible way what is referencing and object and why it can't be garbage collected.
A:
The profiler built into Flash Builder 4 should be able to provide you with the kind of information you want. Likely the object references panel.
Tegeril
2010-09-21 14:41:58
UNfortunately, not using flash builder - just the command line flex compiler. THought maybe there was something 3rd party out there.
Mark
2010-09-21 15:00:18
+1
A:
There's a free version from Push button labs too
http://pushbuttonengine.com/2010/06/pushbutton-labs-profiler-open-sourced/
Gregor Kiddie
2010-09-21 14:46:21
Just briefly I have an event assignment in my flex application : initialize="{new Rad_XF(this);}" and then subsequently within the Rad_XF object itself, a new Rad_XF object is allocated periodically and the previous one is deleted (after first removing all eventlisteners, etc, using the localconnection hack, etc. And the previous RadXF object is deallocated and garbage collected every single time without fail, EXCEPT for the very first one allocated from within flex (all the others are within actionscript.) It makes no sense.
Mark
2010-09-21 15:50:03
if you alter the code so that the handler for the initialize event is a function proper rather than inline, do you see the same behaviour?
Gregor Kiddie
2010-09-21 16:00:25
actually yes: I have actually tried a number of variants - even moving that code to actionscript - and no variant has worked - so maybe its not related to it being in flex at all. All I know is there is absolutely no difference in what is happening with the intial "Rad_XF" object that is allocated versus all the subsequent ones, but only the intial one is not being deallocated. I've even tried things like changing the event from initialize to creationComplete - nothing makes a difference. Not getting that profiler to run yet; it says: "Failed to open port42624 for profiler connections."
Mark
2010-09-21 16:04:55
Note: The entire application is within that Rad_FX object. Nothing else is happening of note in the flex file EXCEPT (now that I think of it) a Style I declare in the flex style section that is assigned to elements within Rad_FX; However that happens with every Rad_FX object created, and only the first is not deallocated.
Mark
2010-09-21 16:09:46