views:

55

answers:

2

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
UNfortunately, not using flash builder - just the command line flex compiler. THought maybe there was something 3rd party out there.
Mark
+1  A: 

There's a free version from Push button labs too

http://pushbuttonengine.com/2010/06/pushbutton-labs-profiler-open-sourced/

Gregor Kiddie
when I get it working I'll let you know how if it solved my problem.
Mark
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
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
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
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
can you stick up the code you are using when it's not inline?
Gregor Kiddie