Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic


This variable is accessible from a debugger or your program and allows you to tune allocation diagnostics.

int afxMemDF;


afxMemDF can have the following values as specified by the enumeration afxMemDF:

  • allocMemDF   Turns on debugging allocator (default setting in Debug library).
  • delayFreeMemDF   Delays freeing memory. While your program frees a memory block, the allocator does not return that memory to the underlying operating system. This will place maximum memory stress on your program.
  • checkAlwaysMemDF   Calls AfxCheckMemory every time memory is allocated or freed. This will significantly slow memory allocations and deallocations.


// example for afxMemDF
afxMemDF = allocMemDF | checkAlwaysMemDF;

See Also

MFC Macros and Globals

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.