Root > Reference > All Functions > EurekaRegisterExpectedMemoryLeak

Function EurekaRegisterExpectedMemoryLeak

Previous pageReturn to chapter overviewNext page   

Register an expected memory leak.







Code (Delphi)

function EurekaRegisterExpectedMemoryLeak(

P: Pointer

): Boolean;



P [in]

A pointer to memory block of expected leak.


Return value

Indicate if leak was registered successfully. A False value usually indicate that this block was already registered.



This function registers a particular memory block to be excluded from memory leaks report. This feature can be used to skip reporting for "leaks by design" or for bugs in 3rd party code over which you have no control.


This function is used to exclude already allocated blocks. Thus, this function is usually used to register leaks from 3rd party code. To register expected leaks in your own code - you can use either this function or DisableMemLeaksRegistering function.



While it is usually not needed, but you can call EurekaUnregisterExpectedMemoryLeak function to unregister memory block from excluded leaks.



You must pass a pointer to the beginning of the memory block. Please note that dynamic arrays and strings do not point to the beginning of allocation. Use EurekaRegisterExpectedMemoryLeakDynArray and EurekaRegisterExpectedMemoryLeakStr for dynamic arrays and strings instead of this function.


See also

Send feedback... Build date: 2022-03-28
Last edited: 2022-03-28
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.

Permanent link to this article: