Can memory be cleaned up?

后端 未结 7 2236
一向
一向 2020-12-04 10:41

I am working in Delphi 5 (with FastMM installed) on a Win32 project, and have recently been trying to drastically reduce the memory usage in this application. So far, I hav

7条回答
  •  甜味超标
    2020-12-04 11:13

    Let's get this straight: FastMM4 does not leak memory, your code might.

    To know for sure, execute this instruction somewhere in your application (where FastMM4 is in the uses clause and $define ManualLeakReportingControl is set, in FastMM4Options.inc for instance):

    ReportMemoryLeaksOnShutdown := True;
    

    FastMM4 will then report at the end if you forgot to free some memory.

    If you wish to know a bit more, you can watch this video from CodeRage 2: Fighting Memory Leaks for Dummies

提交回复
热议问题