Disable Ressource-Leak-Check

contains all delphi packages mentioned below

Disable Ressource-Leak-Check

Postby Aposoft » Fri Nov 08, 2019 2:41 pm


we have a module, which loads a lot of data into the RAM.
When run this with Ressource-Leak-Check aktivated, I reports no leaks.
But when the check is active it makes the module really slow and eats a lot of memory.
Indeed it uses so much memory, so that if the module is loaded at a later time
or there are more modules which are loaded there occurs a memory overflow.
Since the module is already checked for memory leaks the idea is to disable the
leak-check for the time where the large module is loaded.
Is there a solution / a idea for such a problem? Maybe a compiler-switch?
Or is there a plan to make madExcept.MESettings.ReportLeaks writeable?
Or is it impossible to stop the leak-protokoll?

Greetings from Weener, germany
i.A. Gerit Freericks
Posts: 1
Joined: Fri Nov 08, 2019 2:21 pm

Re: Disable Ressource-Leak-Check

Postby madshi » Tue Nov 12, 2019 4:08 pm

Maybe you can simply disable resource checking for this module altogether? Or is that not what you want?

Resource leak checking was never intended to be used during actual production run on users' PCs, it was meant as a developer-only feature. As such, I didn't expect a slow-down to be a big problem. In any case, there's not much I can do about either the slow-down to the high memory use. Of course compiling your project in 64bit might help with the "out of memory" problem, but the slow-down will stay.

Alternatively, you could call "madExcept.StopLeakChecking(false)" to pause leak checking for a while and then restart it with "madExcept.StartLeakChecking(false)".

Hope that helps?
Site Admin
Posts: 10200
Joined: Sun Mar 21, 2004 5:25 pm

Return to madCollection

Who is online

Users browsing this forum: No registered users and 3 guests