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

Bug 431634

Summary: Tabbar item HideDDiagramElementAction is never disposed.
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
Version: 1.0.0M6Keywords: triaged
Target Milestone: 1.0.0M7   
Hardware: PC   
OS: Windows NT   
Whiteboard:
Attachments:
Description Flags
Tabbar leak reference memory snapchot
none
Screenshot with the proposed correction none

Description Maxime Porhel CLA 2014-03-31 09:31:48 EDT
Created attachment 241433 [details]
Tabbar leak reference memory snapchot

The tabbar 'Hide element' action is never disposed, it cause a memory leak as the DDiagramEditorImpl, its pats and model are retained after its disposal.

This can be in the attached screenshot of a Yourkit memory snapshot taken during one of our internal Junit test suite.
Comment 1 Maxime Porhel CLA 2014-03-31 09:43:51 EDT
See https://git.eclipse.org/r/24200 for a correction. 

The action can now be disposed and is disposed during the tabbar disposal when the editor is closed.
Comment 2 Maxime Porhel CLA 2014-03-31 09:46:08 EDT
Created attachment 241435 [details]
Screenshot with the proposed correction

A memory snapshot has been taken with the proposed patch applied, on the same junit test suite (but later and with several editor still openened in the current test).
Comment 3 Maxime Porhel CLA 2014-04-01 04:46:30 EDT
See https://git.eclipse.org/r/24248 and https://git.eclipse.org/r/24247, these two patch set improve several tabbar item dispose and contributions (see commit message for more imformation).
Comment 4 Maxime Porhel CLA 2014-04-03 04:15:09 EDT
Fixed by commits:
* 47215779f12a8d69693471db64da5550e19673bc
* 75f6d0d5d76c53d6fdcdf1b3b35958df0835ebb3
* e26dadaa41da451a8af40b7fc06d0027711ebe27
Comment 5 Maxime Porhel CLA 2014-04-07 04:35:40 EDT
See Bug 431778 for the root cause of this leak, in the platform.
Comment 6 Pierre-Charles David CLA 2014-05-12 03:46:06 EDT
Available in Sirius 1.0.0M7 (see https://wiki.eclipse.org/Sirius/1.0.0M7 & http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tag/?id=v1.0.0M7).