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-20 22:24:52.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-04-20 22:24:58.000000000

Patch Set 1:

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

-------------------------------------
author: Zaid Mosley
date: 2016-04-20 22:29:15.000000000

Patch Set 1: Code-Review-1

Disposing in PostConstruct looks wrong

-------------------------------------
author: Izabella Parker
date: 2016-04-20 22:46:06.000000000

Patch Set 1:

I have done it based on a fix for a similar leak in a superclass, and have checked by logs that the dispose is only called when the workLeon Ochoach is closed, but if adding a disposeExec in postConstruct is a bad idea, then I will not do it :)
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=6b4bdfc4ee69bd387a13ea407c8c7cfbdd780db4

-------------------------------------
author: Izabella Parker
date: 2016-04-20 22:46:32.000000000

Abandoned

Abandoning based on comments, there has to be another way.

-------------------------------------
author: Brenden Conley
date: 2016-04-20 22:52:41.000000000

Patch Set 1:

Build Successful 

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

-------------------------------------
author: Zaid Mosley
date: 2016-04-20 23:01:09.000000000

Patch Set 1:

PostConstruct is called during the initialization phase, I would be surprised if that is the correct place to dispose the image which is needed by the renderer.

-------------------------------------
author: Izabella Parker
date: 2016-04-20 23:20:49.000000000

Patch Set 1:

Actually PostConstruct is registering a disposeExec containing the dispose, and disposeExec based on the Javadoc "Causes the run() method of the runnable to be invoked by the user-interface thread just before the receiver is disposed.", so even though the exec is registered during the initialization phase, the runnable with the dispose is executed before StackRenderer gets disposed, based on my understanding and my experiments.

-------------------------------------
author: Teagan Marsh
date: 2016-04-20 23:58:46.000000000

Patch Set 1:

(1 comment)

Line:567, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java -> This callback should be registered closer to where the image is actually created (i.e., in getViewMenuImage()).  After all, the viewMenuImage may never actually be created, and so viewMenuImage would be null.

-------------------------------------
author: Izabella Parker
date: 2016-04-21 06:07:34.000000000

Restored

Restoring for next tries.

-------------------------------------
author: Izabella Parker
date: 2016-04-21 06:07:44.000000000

Patch Set 2: Patch Set 1 was rebased

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