DESCRIPTION

Bug 420956 - Explicitly dispose CommandContributionItem after disconnecting it from manager

Change-Id: I61e7d3eea9fc1a0d4b85a9d3e94c04f69ab68453
Signed-off-by: Jayvion Booth xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2015-02-15 15:15:36.000000000

Patch Set 8:

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

-------------------------------------
author: Brenden Conley
date: 2015-02-15 15:31:10.000000000

Patch Set 8: Verified+1

Build Successful 

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

-------------------------------------
author: Sebastian Porter
date: 2015-02-17 15:19:14.000000000

Patch Set 8:

The code looks reasonable. Are there any steps that allow to verify the fix?

-------------------------------------
author: Jayvion Booth
date: 2015-02-17 15:28:52.000000000

Patch Set 8:

Place a breakpoint at line 656 in CoolBarToTrimManager -  item.dispose() will be called as soon as you open customize perspective. There are few items which need to be converted, so the breakpoint will be hit multiple times.

-------------------------------------
author: Sebastian Porter
date: 2015-02-17 16:21:39.000000000

Patch Set 8:

OK, I see it. However, I noticed that when opening the CPD, over 40 CommandContributionItem instances are created each time. This change here would only result in 2 being disposed, so maybe it isn't complete yet.

-------------------------------------
author: Jayvion Booth
date: 2015-02-17 17:00:03.000000000

Patch Set 8:

Dani, not all contributions are CommandContributionItem's which need to be converted, so the code is OK.

-------------------------------------
author: Sebastian Porter
date: 2015-02-17 17:04:24.000000000

Patch Set 8:

Yes, I wasn't arguing that the code is wrong, but I'd expect that if we create 40 new instances each time and never dispose them (unless the 2 fixed by this change), then it looks like we have a bigger problem elsewhere.

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