Community
Participate
Working Groups
Here's what I did: 1. Open a fresh e4 workbench 2. Open the Debug perspective 3. Take a memory snapshot 4. Switch between the Java and Debug perspectives 50 times 5. Take another memory snapshot 6. Compare the memory snapshots Switching the perspectives 50 times increased the heap size by about 2 MB, which is a leak. 1 MB of this is retained by the XMLModelReconciler. The XMLModelReconciler uses a ChangeRecorder to keep track of changes in the model. This ChangeRecorder retains a great number of model objects; these model objects are rooted at the ChangeRecorder, which means that they are no longer alive. Another (very small) leak is that after switching the perspectives (50+10 times), there were 62 PerspectiveSwitcher instances (originally there was only one). See screenshot for allocation stack trace. There are some more leaks related to perspective switching (the other 1 MB of the above 2 MB). There are leaked TrackableComputationExt instances. These trackables use WeakReferences, so perhaps the leak will disappear when the other leaks are fixed.
Created attachment 173892 [details] Profiler screenshot: Memory retained by XMLModelReconciler (before/after)
Created attachment 173894 [details] Profiler screenshot: Allocation stack trace for PerspectiveSwitcher
(In reply to comment #0) > Another (very small) leak is that after switching the perspectives (50+10 > times), there were 62 PerspectiveSwitcher instances (originally there was only > one). See screenshot for allocation stack trace. I don't think this should be a problem anymore as Paul has fixed my trim code to not regenerate new instances.
Okay, I will verify this.
Verified in CVS Head. Marking as fixed.