DESCRIPTION

Bug 391118 - StackRenderer leaks viewMenuImage 

Dispose leaking image from StackRenderer.

Change-Id: Id4b6636dc088f292c2babd922d14998ae358b87d
Signed-off-by: Izabella Parker xxx@xxx.xxx

COMMENTS

author: Izabella Parker
date: 2016-04-21 06:09:37.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2016-04-21 06:09:43.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9212/

-------------------------------------
author: Brenden Conley
date: 2016-04-21 06:40:23.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9212/ : SUCCESS

-------------------------------------
author: Teagan Marsh
date: 2016-04-21 13:13:18.000000000

Patch Set 3: Code-Review-1

Thanks for taking another stab at this.  A few things:
- viewMenuImage is a field on the StackRenderer instance, so dispose of the image in xxx@xxx.xxx — that will dispose of the image when the renderer itself is destroyed. With a disposeExec(), the image will only be disposed of when the SWT system is taken down (usually when the JVM exits), so still effectively a leak.
- you need to check that viewMenuImage != null and that it hasn't already been disposed
- resources like images should be disposed off the SWT thread

-------------------------------------
