Played around, commenting out stuff and think I've found what's pinning it.

The Explorer has an ExplorerBar, which contains a bunch of navigation
buttons and a view date component. That date component is one of ours and is
a subclass of mx:DateField (actually a subclass of
com.jabbypanda.controls.DateField4).

If I comment out all references to that (effectively remove it from
existence) the Explorer and ExplorerBar get cleared down. Now I obviously
need to put this component back in and cannot easily see why it is not
clearing down. I was thinking maybe the dropdown chooser (as that actually
get created when the DateField is created and we have a customisation of
that too) and I have seen mentions of leaks around that area
(https://issues.apache.org/jira/browse/FLEX-9617)...


Alex Harui wrote
> Well, it may not be about "clearing".  But if removeAllChildren() made a
> difference, that means that the children are pinning the explorer in
> memory, and you could just start removing individual children to see which
> one makes a difference.
> 
> I've seen a component having focus pin the component.  One test is to add
> code to get the Explorer to go away without touching any children in the
> Explorer.  Like add a Button outside the Explorer.
> 
> Another time, a component hooked up a timer.  The timer is then
> referencing the component and the component references the parent chain
> back to the top-level object.  Use of SetInterval and SetTimeout also
> create timers under the hood.
> 
> Yet another time, someone embedded an icon for a button that wasn't a PNG
> or JPG, it was a SWF that had a timeline animation.  The player references
> the SWF in order to play the animation, the SWF references the button, the
> button references a parent chain back to the top-level object.
> 
> And there are countless other scenarios where Singletons get registered
> and reference a child.
> 
> -Alex





--
View this message in context: 
http://apache-flex-users.2333346.n4.nabble.com/Using-Adobe-Scout-to-locate-memory-leak-tp7770p7969.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply via email to