注册内存漏洞

来源:互联网 发布:360网络联盟 编辑:程序博客网 时间:2024/04/30 08:21

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.

原创粉丝点击