Opened 16 years ago
Closed 16 years ago
#2849 closed defect (fixed)
[PATCH] Preferences dialog leaks memory
Reported by: | jttt | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
First time PreferencesDialog is shown, 4MB of memory is not released. Every subsequent use of PreferencesDialog leaks another 750kB of memory.
This happens because settings modules are kept in static variable PreferencesDialog.settings - that acounts for the first 4MB. When PrefererencesDialog is shown then some preferences modules add listener to the dialog which prevents dialog from being released from memory and accounts for another 750kB.
The patch fixed that by using settings module factory instead of direct references to settings module.
Don't forget to add two new files to version control:
src/org/openstreetmap/josm/plugins/PluginPreferenceFactory.java
src/org/openstreetmap/josm/gui/preferences/PreferenceSettingFactory.java
Plugins are not affected except for little change is color-schema, which I can commit by myself.
Attachments (1)
Change History (2)
by , 16 years ago
Attachment: | preferencesmemoryleak.patch added |
---|
comment:1 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In r1742.