View Full Version : IE7 Memory Leak Issue for TreePanel

3 May 2011, 3:38 PM

I'm working on a feature that requires constantly reload the tree. I'm using tree.getRootNode().reload(); With Drip, I found there's memory leak issues with this method. The memory usage never goes down :(( after reloading the tree.

I'm wondering whether there's any other way to reload the tree or anyone knows how to fix the leak with the reload() method.


3 May 2011, 6:37 PM
simple way, not to reload, just recreate a new treepanel. that's not a good solution.
do you create dom nodes in treepanel initialization? if you do not manully destory them, leak issue will exisit

for example
GridView's rows recreated when store is changed, if you addListener on the row's node and do not removeListener when rows's html content removed, there have leak issue.
We only addListener on gridview rows container dom node. it's not recreated where store is changed.

4 May 2011, 1:56 PM

So I need to manually destroy all the dom elements being created during the tree rendering and remove the listeners on them?

Do you know whether there's any existing method I can call to fully destroy a tree? I called tree.clearInnerCt() and tree.clearListeners() but can't see improvement in performance :(