Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333268

Summary: [Workbench] Static field PresentablePartFolder#tempPartInfo prevents display reference from GC
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: ivan, wolfgang.pedot
Version: 1.4   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
make tempPartInfo into non-static member variable none

Description Ralf Sternberg CLA 2010-12-28 11:30:54 EST
We should understand why this field is static and if turning it into a member field or a local variable would have any side effects.
Comment 1 Wolfgang Pedot CLA 2016-08-29 11:33:50 EDT
Quite an old bug, I was about to report that myself...
As far as I can see the field is only used in initTab to transport data and making it a local variable in that method should not be a problem.
Comment 2 Ivan Furnadjiev CLA 2016-08-30 03:17:17 EDT
(In reply to Wolfgang Pedot from comment #1)
> Quite an old bug, I was about to report that myself...
> As far as I can see the field is only used in initTab to transport data and
> making it a local variable in that method should not be a problem.

Could you provide a fix through Gerrit [1]?

[1] https://eclipse.org/rap/source/ 
[2] https://wiki.eclipse.org/RAP/Git
Comment 3 Wolfgang Pedot CLA 2016-08-30 04:48:42 EDT
Created attachment 263840 [details]
make tempPartInfo into non-static member variable

Here is a patch, I checked whats happening with tempPartinfo during the setInfo and setSelectedInfo calls and all implementations I could find only access the members of tempPartInfo without storing its reference so there should be no side-effects. Making it non-static is less invasive than turning it into a local variable.