RAD Studio (Common)
ContentsIndex
PreviousUpNext
Registering Memory Leaks

This section describes how to register and unregister expected memory leaks.  

When you allocate memory that you don't expect to free, you can register it with the Memory Manager. The Memory Manager adds it to a list of areas to ignore when it checks for memory leaks. When you unregister a memory location, the Memory Manager removes it from its list of expected memory leaks.

To register an expected memory leak:

  1. Identify the pointer to the memory area you don't expect to free.
  2. Pass the pointer to RegisterExpectedMemoryLeak.

To unregister an expected memory leak

  1. Identify the pointer to the memory area you want to unregister.
  2. Pass the pointer to UnregisterExpectedMemoryLeak.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!