flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From XaviConde <javier.co...@gruposame.com>
Subject UIComponent not removing its event listeners?
Date Thu, 18 Feb 2016 14:03:08 GMT

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, 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-removing-its-event-listeners-tp51608.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

View raw message