Bug 44908 - [Palette] DefaultPaletteViewerPreferences never remove listeners
Summary: [Palette] DefaultPaletteViewerPreferences never remove listeners
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: 2.1.2   Edit
Hardware: PC Windows XP
: P4 minor (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-15 10:56 EDT by Masaki Saitoh CLA
Modified: 2010-11-04 17:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Saitoh CLA 2003-10-15 10:56:27 EDT
DefaultPaletteViewerPreferences adds listeners to the preference store and the 
font registry.  Because DefaultPaletteViewerPreferences never removes the 
listeners, it consumes memory even when PaletteViewer is released.

I know it is static for Logic Editor and its memory usage is small but I want 
to create a subclass of DefaultPaletteViewerPreferences for my palette 
implementation.
Comment 1 Randy Hudson CLA 2003-10-16 10:58:43 EDT
It is too late for us to fix this bug.  In general, since the preference store 
is a singleton, the palette preferences are usually singletons too.  That's why 
the logic example just holds onto it.  If the preference store can only store a 
single value for properties like "PREFERENCE_FONT", then when would more than 
one instance be useful?

If I am good at guessing, you are trying to create a preference per editor, or 
something like that.  Or maybe you have a few different types of palettes or 
palette contexts.  The workaround might be to create multiple wrappers which 
wrapper the default implementation's singleton for your preference store.
Comment 2 Randy Hudson CLA 2004-06-16 15:09:04 EDT
Pratik, can we add a dispose() method or something?