Community
Participate
Working Groups
Eclipse M5 1) Import junit 3.8.1 as in the Smoke test 2) Select junit.awtui.AboutDialog 3) Select refactor->rename from the context menu 4) Enter "AboutDialog2" as the new name 5) Press the preview button 6) press ok TextMergeViewer adds a IDocumentListener (instance variable fDocumentListener) that doesn't seem to be cleaned up in this case.
Additional info about compare leak. Following objects are left when you close the compare window. Some of them are required to stay in memory but any of following with head count equal to 3 or multiples of 3 are increased each time you run compare and close window. These results are of after running GC explicitly. I am interested to know if there are immediate plans to fix it. profiler>*****GC Finished with: ---- used_objects: 489495 ---- used_object_space: 8713664 Class Name: org.eclipse.compare.internal.TextMergeViewerCreator, Objects Left: 1 Class Name: org.eclipse.compare.contentmergeviewer.TextMergeViewer, Objects Left: 3 Class Name: org.eclipse.compare.contentmergeviewer.TextMergeViewer$4, Objects Left: 3 Class Name: org.eclipse.compare.internal.MergeSourceViewer, Objects Left: 9 Class Name: org.eclipse.compare.contentmergeviewer.TextMergeViewer$24, Objects Left: 3 Class Name: org.eclipse.compare.contentmergeviewer.TextMergeViewer$26, Objects Left: 3 Class Name: org.eclipse.compare.contentmergeviewer.TextMergeViewer$27, Objects Left: 3 Class Name: org.eclipse.compare.contentmergeviewer.TextMergeViewer$28, Objects Left: 3 Class Name: org.eclipse.compare.contentmergeviewer.TextMergeViewer$2, Objects Left: 3 Class Name: org.eclipse.jface.text.DocumentCommand, Objects Left: 9 Class Name: org.eclipse.compare.contentmergeviewer.TextMergeViewer$HeaderPainter, Objects Left: 3 Class Name: org.eclipse.compare.contentmergeviewer.TextMergeViewer$25, Objects Left: 3 Class Name: org.eclipse.compare.contentmergeviewer.TextMergeViewer$ChildPositionUpdater, Objects Left: 3 Class Name: org.eclipse.compare.contentmergeviewer.TextMergeViewer$Diff, Objects Left: 90
Will look into that...
Created attachment 15590 [details] Contains html document that shows path to GC root object from Document that is not being freed
One thing that you need to do is to remove ContributionItems from toolbar manager.
Any progress on this one ?
Yes, culprit is SourceViewer. fDocument is now nulled on dispose. As a consequence SourceViewer.getDocument() returns null which makes TextMergeViewer.unsetDocument leak a reference. Will be fixed for N20041123.
fixed for N20041123