Bug 500482 - FormFonts being a singleton prevents one Display from being GCed
Summary: FormFonts being a singleton prevents one Display from being GCed
Status: REOPENED
Alias: None
Product: RAP
Classification: RT
Component: JFace (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-30 05:14 EDT by Wolfgang Pedot CLA
Modified: 2016-09-07 05:22 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Pedot CLA 2016-08-30 05:14:38 EDT
org.eclipse.ui.internal.forms.widgets.FormFonts is a regular singleton and has a member "resources" of type LocalResourceManager. That LocalResourceManager delegates to another ResourceManager obtained by calling JFaceResources.getResources() which in turn uses Display.getCurrent() so the first Display using FormFonts will never be GCed. From what I can see that Display is not really used (at least BoldFontDescriptor.createFont does not use it).

FormImages was a similar thing but that class has appearantly been stripped of all functionality so it does not hold a reference to a LocalResouceManager any longer...
Comment 1 Ivan Furnadjiev CLA 2016-09-07 03:58:02 EDT
I'll close this bug as duplicate of 493860. Please reopen if you disagree.

*** This bug has been marked as a duplicate of bug 493860 ***
Comment 2 Wolfgang Pedot CLA 2016-09-07 05:12:22 EDT
My definition of a duplicate bug is that if the first one gets resolved the duplicate is automatically resolved as well. By that definition this is not a duplicate of bug 493860 because it requires extra work. It is pretty much an identical issue but at another place.

It is fine with me to merge those two issues if that is your intention.
Comment 3 Ivan Furnadjiev CLA 2016-09-07 05:22:46 EDT
OK... let reopen it than.