Page 1 of 1

Hiding Leaks

PostPosted: Fri Feb 14, 2020 9:59 am
by david_navigator
I'm trying to hide a memory leak in TnxMessageRelayClient

I have this in my code
madexcept.ReportLeaks := True;

but the memory leak is still being reported

memory main thread ($fcc):
671a6c2c madExcept32.dll madExceptDbg 2840 VirtualAllocCallback
00b78e29 HireTrack_NX_API.exe nxpvWindowHandle 129 nxMakeObjectInstance
00b79064 HireTrack_NX_API.exe nxpvWindowHandle 206 nxAllocateHWnd
008df690 HireTrack_NX_API.exe nxdb 5093 TnxBaseSession.CreateInstance
00ca82b8 HireTrack_NX_API.exe nxmrClient 349 TnxMessageRelayClient.scStarting
0085f7e5 HireTrack_NX_API.exe nxllComponent 2512 TnxStateComponent.scSetState
0085f469 HireTrack_NX_API.exe nxllComponent 2424 TnxStateComponent.scSetActive
00ca8ef7 HireTrack_NX_API.exe CallBackU 118 TCallBack.Create

Am I doing something wrong ?



Re: Hiding Leaks

PostPosted: Thu Feb 20, 2020 4:21 pm
by madshi
This specific HideLeak API isn't based on the callstack, but the pointer you enter itself is not reported as a leak. What you want to do is probably hide this leak based on the callback. E.g. something like this should do the trick: