Note that there are some explanatory texts on larger screens.

plurals
  1. POMy program never releases the memory back. Why?
    primarykey
    data
    text
    <p>I have a MDI program. When It starts it takes 2-3MB of RAM. Then, in this program I create about 260 MDI child windows (each has a TStringGrid, a bitmap and some other controls) and display some data. The application needs about 500MB to load all those windows. If I close each MDI child manually, the application still uses 160MB of RAM. Why it doesn't return to few MB of RAM? Should I worry about this? 160MB it is A LOT for a system that has only 1GB or RAM!!</p> <p>Note: I use the WORKING SET column in Task Manager to see RAM statistics. Maybe I need a better tool to read the RAM utilization. (Private Working Set is just a bit smaller than Working Set).</p> <p><strong>This is not a leak!</strong><br> FastMM (set on aggressive) indicates no memory leak when I close the program. See my Answer post for additional evidence that it isn't a leak.</p> <p><strong>I release stuff</strong><br> Many people told me that closing a child window only hides it. I know that. I use "Action:= caFree" to actually release the forms. Each form is responsible for releasing the controls it holds.</p> <p><strong>Answer</strong><br> I have found that FastMM is responsible for this. See the answer I posted below.</p> <hr> <p>Delphi 7, Win 7 32 bit<br> Similar posts:<br> <a href="https://stackoverflow.com/questions/2031577/can-memory-be-cleaned-up/4493826#4493826">Can memory be cleaned up?</a><br> <a href="https://stackoverflow.com/questions/4493917/when-to-call-setprocessworkingsetsize-convincing-the-memory-manager-to-release">When to call SetProcessWorkingSetSize? (Convincing the memory manager to release the memory)</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload