Bug 563150 - Better clean DAnalysisSessionImpl when closing
Summary: Better clean DAnalysisSessionImpl when closing
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 6.3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 6.4.0   Edit
Assignee: Laurent Redor CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2020-05-14 03:42 EDT by Laurent Redor CLA
Modified: 2020-12-04 04:23 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Redor CLA 2020-05-14 03:42:11 EDT
In DAnalysisSessionImpl.close(IProgressMonitor), the first thing is to check if it is opened and to return without doing nothing if not.

The close method cleans "stuff" done at opening but also "stuff" done at instantiation. So if someone creates a DASI without open it, he can not "clean" this DASI and this leads to memory leaks.

The goal of this issue is to allow the close method to clean all "instantiation stuff" even if the DASI is not opened. This is the less impacting solution. Another approach would be to have a dispose method, but the order of each statement in close method is probably important.

Examples of "stuff" not cleaned:
* disable and remove ECrossReferenceAdapters
* several listeners on TransactionalEditingDomain (dRepresentationChangeListener, changeIdUpdaterListener, ...)
* flush of the CommandStack
* unload of resources
* ...
Comment 1 Laurent Redor CLA 2020-05-14 12:46:34 EDT
https://git.eclipse.org/r/#/c/163010/ Proposition of fix
Comment 3 Eclipse Genie CLA 2020-08-05 11:48:05 EDT
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/167301
Comment 4 Julien Dupont CLA 2020-10-08 10:51:32 EDT
How to verified this issue?
Comment 5 Florian Barbin CLA 2020-11-17 09:41:02 EST
Verified with Team for Capella product
Comment 6 Pierre-Charles David CLA 2020-12-04 04:23:12 EST
Available in Sirius 6.4.0, see https://download.eclipse.org/sirius/updates/releases/6.4.0/ for details.