I'm trying to hide a memory leak in TnxMessageRelayClient
I have this in my code
initialization
madexcept.hideleak(TnxMessageRelayClient,1000);
madexcept.hideleak(TnxBaseSession,1000);
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 ?
Cheers
David
Hiding Leaks
Re: Hiding Leaks
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:
HideLeak('VirtualAllocCallback|nxMakeObjectInstance|nxAllocateHWnd|TnxBaseSession.CreateInstance');
HideLeak('VirtualAllocCallback|nxMakeObjectInstance|nxAllocateHWnd|TnxBaseSession.CreateInstance');