I have got a memory leak problem in the example below(u can download the code from the link)
http://brandonmeyer.net/projects/SuperPanelDemo/SuperPanelDemo.html
Running in Profiler:-
What I am trying to do is creating new panels by selecting the Add new panel button.
I am selecting option allow Close (check box).
(After creating few panels and closing these panels i could find there is memory leak with the SuperPanel class)
So my problem is how to resolve this memory leak. I tried by changing optional parameters in addEventListener, but that didn’t work. Can someone provide me the solution
I think your problem is related to your bindings.
BindingUtils.bindPropertyis being given an yourpanelinstance, trying it to the object graph and making it inapplicable for garbage collection.bindPropertyreturns aChangeWatcher, which you can use to unregister the binding when you are done with it. Something like the following:Also, you have not overridden the
cloneevent inSuperPanelEventwhich will cause you issues later. See this question for more details.