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?

-Alex

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

>Hi,
>
>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:
>
>https://github.com/apache/flex-sdk/blob/develop/frameworks/projects/framew
>ork/src/mx/core/UIComponent.as#L1709
>
>        addEventListener(Event.ADDED, addedHandler);
>        addEventListener(Event.REMOVED, removedHandler);
>        addEventListener(Event.REMOVED_FROM_STAGE,
>removedFromStageHandler);
>
>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
>that
>called the corresponding removeEventListener()?
>
>Thanks in advance!
>
>
>
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/UIComponent-not-remov
>ing-its-event-listeners-tp51608.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to