Opened 18 years ago
Closed 17 years ago
#432 closed defect (fixed)
DownloadDialog leaks (8MB)
Reported by: | Owned by: | framm | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: | petr.nejedly@… |
Description
The OSM download dialog is never freed from memory, which reduces the heap available to the application by 8MB (because of the world map).
Attachments (2)
Change History (8)
by , 18 years ago
Attachment: | josm-image-leak.diff added |
---|
comment:2 by , 18 years ago
Cc: | added |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
I have to reopen this bug, as r412 caused a regression (the leak is back).
I'm sorry my patch caused bug #446 (fixed by above mentioned r412), I specifically tested whether the dialog gets recreated on subsequent accesses, but missed the GPX import (I usually work with my local traces).
The field needs to be cleared to free the memory and it is unfortunate that the GPX downloader access it this way.
I'll prepare better fix and post the diff later.
comment:3 by , 18 years ago
Are you sure that there is a leak now? I did a few downloads and top didn't show any increase in memory use. (Or at least way less than 8M per download)
by , 18 years ago
Attachment: | josm-image-leak2.diff added |
---|
Improved fix. Doesn't cause the NPE and prevents the leak through anither discovered path. Note it removes the ESC listener os the mouse selection, but it didn't worked anyway.
comment:4 by , 18 years ago
I have updated the fix. The removal of the ESC listener might be questionable, but it didn't work (for me at least, ESC does nothing during mouse drag) and its original registration to the main window was wrong anyway:
It registered the SelectionManager used for selection on the download's WorldMap as a listener on the main mapping frame!
comment:5 by , 18 years ago
Yes, I'm sure there is a leak without my fix. Though the leak is one-time, as every new usage of the Download dialog frees the old instance (replaces the "dialog" field with new instance).
comment:6 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
patch (semi)applied in r612. some things take longer than others... had overlooked this one
Potential fix