Possible memory leak
See original GitHub issueRef: this issue
Summary: Ginga reference viewer may have a memory leak. The basic widget does not exhibit the leak.
- The Ginga reference viewer’s memory limiting option, the
numImages
channel setting, does not seem to be limiting memory use as it used to. When opening multiple files with one channel open and thenumImages
set to a small fixed number, the memory use seems to be rising proportionally to the image array sizes. Instead, the memory size should plateau some short period after the limit has been reached and then only gradually increase by the size of a thumbnail image and a few bits of accounting data. - The problem seems to happen regardless of whether the Qt or Gtk toolkit has been used
- The problem is not exhibited with the basic ginga viewer widget. You can start the
example2_qt.py
and load image after image, the size plateaus after a bit and then just rises and falls within the plateau range.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:39 (27 by maintainers)
Top Results From Across the Web
My system scan results says "An active process has a possible ...
My system scan keeps telling me "An active process has a possible memory leak (Microsoft EdgeCP.exe)
Read more >How do I check for memory leaks, and what should I do to stop ...
To find a memory leak, you've got to look at the system's RAM usage. This can be accomplished in Windows by using the...
Read more >Memory leak / Handle leak | Firefox Support Forum
Here is a fairly simple explanation for a memory leak: A Memory leak occurs when your computer closes an open program and that...
Read more >Memory leak - Wikipedia
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in...
Read more >How To Fix Windows 10 Memory Leaks - Online Tech Tips
A Windows 10 memory leak occurs when an app you were using didn't return the resources to your system when you finished using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have often thought that
numImages
is a bit of a rough tuning parameter. It would make more sense to have the parameter be based on how much memory is being taken by the channel. It seems like with some of the memory packages that are available we might be able to do that. Or bypassing that, just keep a running total per-channel of the bytecount of the data/header areas loaded. Something to think about for a future release, perhaps.Well, it is a “feature” and not a “bug” that Ginga keeps track of every image that you load into it and don’t remove. I think it would qualify as a leak if Ginga does not recover memory for images that you remove. It does remove the pixel and header data for “loaded” images from memory in a user configurable fashion (i.e.
numImages
), but keeps enough information to reload the image if possible and to show what is still “remembered” by the viewer. It’s hardly surprising that this bookkeeping for each image does take some space.