Community
Participate
Working Groups
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.
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.
Pratik, can we add a dispose() method or something?