Bug 117725 - Memory leak in DeferredLayoutCommand
Summary: Memory leak in DeferredLayoutCommand
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P1 major
Target Milestone: ---   Edit
Assignee: Steven R. Shaw CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-11-23 10:06 EST by Dusko CLA
Modified: 2006-01-16 09:19 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dusko CLA 2005-11-23 10:06:19 EST
There is memory leak in DeferredLayoutCommand. It has two fields that potentialy can keep lot of object in memory - containerEP and viewAdapters. Only the containerEP is cleaned after execution. Since the command goes on the undo stack after execution it holds onto objects in the viewAdapters list. In my particular scenario it accounted for a memory leak that was causing Out Of Memory exceptions.

Proposed fix:

1) Remove the "containerEP = null;" line from the "doExecute(...)" method.

2) Add the following method:

	protected void cleanup() {
		viewAdapters = null;
		containerEP = null;
		super.cleanup();
	}
Comment 1 Steven R. Shaw CLA 2005-11-23 13:02:19 EST
Added cleanup method and null out viewDescriptors field as suggested.
Comment 2 Eclipse Webmaster CLA 2010-07-19 12:30:27 EDT
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug