UIComponent not removing its event listeners?

2016-02-18 Thread XaviConde
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/framework/src/mx/core/UIComponent.

Re: UIComponent not removing its event listeners?

2016-02-22 Thread XaviConde
Hi Alex, I'm analyzing a simple case, where an About popup dialog is closed but several of the objects used are still in memory. In this case, the About class inherits from TitleWindow, which inherits from UIComponent. I take memory snapshots before opening the popup and after closing it. I can

Re: UIComponent not removing its event listeners?

2016-02-22 Thread XaviConde
Thanks Alex. I'm working on a sample project to expose the problems we're having. I'll create a new thread about it tomorrow. Regards! -- View this message in context: http://apache-flex-development.247.n4.nabble.com/UIComponent-not-removing-its-event-listeners-tp51608p51669.html Sent from

Memory leak caused by addChild() ?

2016-02-23 Thread XaviConde
Hi everyone, I'm investigating memory leaks in an application, and since the codebase is very complex, I've downloaded a simple project from http://dreamingwell.com/articles/archives/2008/05/understanding-m.php to understand what causes a memory leak and what doesn't. The Flash Builder project can

Re: Memory leak caused by addChild() ?

2016-02-24 Thread XaviConde
Thanks Clint, but I've commented it as well and the memory leak is still happening. Profiler still reports memory constantly increasing. I've also commented the other addEventListener calls just in case, and the only way to stop the leak is by commenting on addEventListener(). Did the Flash Profile

Re: Memory leak caused by addChild() ?

2016-02-24 Thread XaviConde
Hi Clint, Flash Profiler has a functionality to force garbage collection. I press the button several times and there's no instance being freed. Besides, taking a memory snapshot also forces garbage collection. On the other hand, after several hours of Flash Profiling, I have found a workaround by

Re: Memory leak caused by addChild() ?

2016-02-25 Thread XaviConde
Hi Alex, Clint, I've finally reproduced the behaviour that you mention, only that I've had to set the timer to 10 seconds. In that situation, forcing a garbage collection from profiler frees some instances, so the number of total instances is lower than Cumulative instances, without changing the c

Re: Memory leak caused by addChild() ?

2016-02-25 Thread XaviConde
After reviewing my 'fix', actually what was happening is that it was making the application crash, which is why the application memory was not increasing... Anyhow I think there should be only 1 instance of NonLeakySubcomponent in memory at any time, irregardless of whether the GC would collect i

Developing Flex SDK with Flex Builder

2016-02-29 Thread XaviConde
Hi everyone, I've downloaded and built successfully flex 4.15.0 from source, following the steps in README (ant main, ant frameworks-rsls, ant -f installer.xml). >From Flex Builder, I've configured the new SDK from Preferences as an available SDK. Then, I've selected the newly built SDK for my pro