pleriche / FastMM5

FastMM is a fast replacement memory manager for Embarcadero Delphi applications that scales well across multiple threads and CPU cores, is not prone to memory fragmentation, and supports shared memory without the use of external .DLL files.
283 stars 73 forks source link

Change FastMM_LogStateToFile FileName parameter from const string into PChar #45

Closed HHasenack closed 7 months ago

HHasenack commented 7 months ago

It is currently defined as a const string, please change into simple PChar Why? Because when calling the routine, even when providing PChar parameter the routine, the compiler decides to allocate a string resulting in a memory report with an allocation leak that is actually the string allocated for the parameter.

I changed it in my FastMM.pas and appears to have no furthed adverse effects in compiling and running.

TIA Hans

pleriche commented 7 months ago

Done