Leak report - InitializeCriticalSection

delphi package - automated exception handling
Post Reply
lxo
Posts: 1
Joined: Thu Jul 30, 2020 11:26 am

Leak report - InitializeCriticalSection

Post by lxo »

Hello,
every time I get the leak report with MadExcept in Delphi, with two entries "InitializeCriticalSection".

The trigger seems to be the initialization part of IdStack.pas and IdThread.pas.

If I deactivate MadExcept and only activate ReportMemoryLeaksOnShutdown in Delphi I get no message about the leaks.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Leak report - InitializeCriticalSection

Post by madshi »

These are true leaks. But they're resource leaks, not memory leaks. ReportMemoryLeaksOnShutdown only checks for memory leaks.

With the latest madExcept update:

http://madshi.net/madCollectionUpdate.exe

... you can call "madExcept.HideInitializationLeaks()" to hide any leaks that occur within any unit "initialization" sections, if you so prefer.
Post Reply