Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333268 - [Workbench] Static field PresentablePartFolder#tempPartInfo prevents display reference from GC
Summary: [Workbench] Static field PresentablePartFolder#tempPartInfo prevents display ...
Status: NEW
Alias: None
Product: RAP
Classification: RT
Component: Workbench (show other bugs)
Version: 1.4   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-28 11:30 EST by Ralf Sternberg CLA
Modified: 2016-08-30 04:48 EDT (History)
2 users (show)

See Also:


Attachments
make tempPartInfo into non-static member variable (885 bytes, patch)
2016-08-30 04:48 EDT, Wolfgang Pedot CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.