Community
Participate
Working Groups
I just noticed that if I work with a snapshot and use the context menu "search queries" , then after I close the snapshot editor the snapshot is still kept in memory. I'll attach some reference chains keeping the snapshots.
Created attachment 168108 [details] Reference chain keeping the SnapshotImpl instance
Created attachment 168112 [details] Path through QueryContextMenu$QueryAction I noticed another similar effect - snapshotImpl being held, probably with a different cause. Still the context menu is involved, so I paste it to the same bug.
We may need to close the QueryContextHelp and dispose the styled text and clear the fields.
Here's the path I fixed with the QueryContextHelp change: Class Name | Shallow Heap | Retained Heap -------------------------------------------------------------------------------------------------------------------------- org.eclipse.mat.parser.internal.SnapshotImpl @ 0x1105370 | 72 | 5,879,992 '- org.eclipse.mat.internal.snapshot.SnapshotQueryContext @ 0x1abef80 | 16 | 5,880,008 '- org.eclipse.mat.ui.internal.browser.QueryContextHelp @ 0x1adde70 | 152 | 5,881,344 '- org.eclipse.jface.window.Window$FontChangeListener @ 0x1ade038 | 16 | 5,881,360 '- [4] java.lang.Object[6] @ 0x1b00d30 | 40 | 5,884,104 '- org.eclipse.core.runtime.ListenerList @ 0xbf7730 | 24 | 5,884,128 '- org.eclipse.jface.resource.FontRegistry @ 0xbae400 | 32 | 5,885,728 |- class org.eclipse.jface.resource.JFaceResources @ 0xbaacb8 | 64 | 536 | '- org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader @ 0xb5f4f8| 96 | 26,616 --------------------------------------------------------------------------------------------------------------------------
I've also put a fix in QueryBrowserPopup to close the help. http://www.eclipse.org/articles/swt-design-2/swt-design-2.html
Is this now fixed?
I did some more tests and couldn't reproduce the problem any longer. Andrew, thanks for the very fast fixes!