Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 434510

Summary: Sirius diagram outline does not remove its actions for the toolbarmanager during dispose.
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: DiagramAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact: Julien Dupont <julien.dupont>
Severity: normal    
Priority: P3 CC: julien.dupont, pierre-charles.david
Version: 1.0.0M7Keywords: triaged
Target Milestone: 1.0.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
A big model none

Description Maxime Porhel CLA 2014-05-09 10:32:23 EDT
This issue is a leak identified during Sirius 1.0.0M7 homologation. 

The two show page actions (Overview, Ouline) provided to the outline toolbar are not removed from the action bar toolbar manager during the dispose of the outline. 

With Luna M7, it causes the ToolbarManagerRenderer to retain the outline (retained heap: 63Mo) through these actions. Furthermore the the outline dispose() method does not completly clean it: the graphicalViewer of its corresponding DDiagramEditorImpl and the thumbnail fields could be set to null.

org.eclipse.sirius.diagram.ui.tools.internal.editor.DiagramOutlinePage.dispose(à should be improved to remove actions from the toolbar manager and reset several fields (graphicalFilter, thumbnail).
Comment 1 Maxime Porhel CLA 2014-05-09 10:39:43 EDT
Created attachment 242895 [details]
A big model

This issue can be reproduced with this 28Mo aird and its 3,5Mo ecore.


Import the attached project. 
Activate the show heap status option.
Restart Eclipse.
Click on the GC action and check the heap status.
Open the aird. 
Open the packageNumber1 package entities diagram.
Select a node, reselect the diagram. 
Play with the outline (overview -> tree outline, right click on several elements, -> overview)
Close the editor. 
Close the session
Click on the GC action and check the heap status.

It must be equivalent to the inital heap.

With Yourkit or Mat, check the dominators, the outline must not appear.
Comment 2 Maxime Porhel CLA 2014-05-09 10:41:43 EDT
See  https://git.eclipse.org/r/26291
Comment 3 Maxime Porhel CLA 2014-05-16 09:32:20 EDT
Fixed by commit d542ab92b7b735c0b7d358a487e88730cc47190a
Comment 4 Pierre-Charles David CLA 2014-06-25 10:15:00 EDT
Available in Sirius 1.0.0.