|
|||||||
![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
I am using a treePanel, and enabling drag and drop (enableDD). I noticed that each time the treePanel is created/destroyed, three new hidden DOM DIV elements are created in the hosting document, which are not removed when the treePanel is destroyed. Looking at the class names, I believe that these elements are related to the drag/drop functionality. I confirmed that if I dont enable drag/drop, this leak does not happen.
Since my application is a single-page that creates/destroys panels and forms continuously, this could lead to serious accumulation of "dead" DIV's. could somebody please look into this? PS Posting an example is not easy, I would need to post the entire app. |
|
#2
|
||||
|
||||
|
We will look into it. Any way it might be possible to use one of our examples or some simplified code to create us a test case.
|
|
#3
|
|||
|
|||
|
ok, I will try
|
|
#4
|
|||
|
|||
|
ok, here is an example that will show the issue.
The attached file is meant to be saved in the root of the Ext structure, and my test was done using vanilla Ext 3.0.0. if you want to save it elsewhere, adjust the paths at the top accordingly. Just make sure you use the same Ext version, please. To see the problem, follow these steps exactly as described: 1. open the file in your browser (I tested IE and Firefox, no diff) you don't need to open the file via Server, local open is fine 2. Press the button 'Save State'. you should see the current count for Elements in the DOM, and Components in componentManager. In my machine, I see 180 Elements, and 17 Components. 3. Press 'Create tree'. wait for the tree to be displayed (a single item) 4. Press 'Destroy tree'. wait for the tree to disappear. 5. Press 'Compare State'. The current counts for Elements and Components should display, and they should be the same as the initial. The 'Diff' fields should show zero. In other words, at this point, a TreePanel was created, rendered, and destroyed, and no orphan Elements or Components seem to have been left behind. Repeat steps 3-5 as many time as you need. The result will be consistent, no leaks. Now, enable the drag/drop functionality by checking the Toolbar checkbox. Repeat steps 3-5. Each time you do that, notice that the Element count increases by 3. This is the leak. The original code that I used to detect this is much more complicated, as it keeps a list of Elements, and does a merge/sort/diff to actually find the orphans. In this way, I was able to find that the three orphans are the ones created by the drag/drop mechanism. I did not post the whole code here, because it is too complicated, and we would end debugging the debugger... Still, the issue is clearly seen with this simple example, you just can't see WHICH elements are orphaned. Mike |
|
#5
|
||||
|
||||
|
Fix applied to svn in rev #5596 for patch release 3.1.
|
|
#6
|
|||
|
|||
|
Thanks for the quick response. Do I have access to SVN as a regular user,or do I need to purchase something ?
|
|
#7
|
||||
|
||||
|
SVN access is for support subscribers, however 3.1 will be out shortly.
|
![]() |
| Thread Tools | |
|
|