The function cvSetMemoryManager sets user-defined memory managment functions (substitutors for malloc and free) that will be called by cvAlloc, cvFree and higher-level functions (e.g. cvCreateImage)

C# | Visual Basic | Visual C++ |
public static void cvSetMemoryManager( CvInvoke..::.CvAllocFunc allocFunc, CvInvoke..::.CvFreeFunc freeFunc, IntPtr userdata )
Public Shared Sub cvSetMemoryManager ( _ allocFunc As CvInvoke..::.CvAllocFunc, _ freeFunc As CvInvoke..::.CvFreeFunc, _ userdata As IntPtr _ )
public: static void cvSetMemoryManager( CvInvoke..::.CvAllocFunc^ allocFunc, CvInvoke..::.CvFreeFunc^ freeFunc, IntPtr userdata )

- allocFunc (CvInvoke..::.CvAllocFunc)
- Allocation function
- freeFunc (CvInvoke..::.CvFreeFunc)
- Deallocation function
- userdata (IntPtr)
- User data that is transparetly passed to the custom functions