flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: UIComponent not removing its event listeners?
Date Thu, 18 Feb 2016 15:20:59 GMT
Listening to yourself with a method (as opposed to a function object)
cannot cause memory leaks.  What are you seeing in the profile that makes
you think these are a problem?


On 2/18/16, 6:03 AM, "XaviConde" <javier.conde@gruposame.com> wrote:

>while troubleshooting for memory leaks in our application using Flash
>Builder's Profiler, I've found that the followning three event listeners
>created by UIComponent are not being destroyed:
>        addEventListener(Event.ADDED, addedHandler);
>        addEventListener(Event.REMOVED, removedHandler);
>        addEventListener(Event.REMOVED_FROM_STAGE,
>I can't find a matching removeEventListener for those events inside
>UIComponent that could be called to remove them. Moreover, since the
>functions are private, our class (which inherits from UIComponent) can not
>call removeEventListener neither itself to remove them.
>* Are those event listeners removed at all?
>* Couldn't they be turned into weak references, or adding a new method
>called the corresponding removeEventListener()?
>Thanks in advance!
>View this message in context:
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

View raw message