Click here to Skip to main content
15,886,014 members
Articles / Desktop Programming / MFC

Catching Memory Leaks

Rate me:
Please Sign up or sign in to vote.
3.08/5 (11 votes)
4 Oct 2000 221.1K   1.5K   48  
How catch memory leaks with very little effort
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(__AFX_STDAFX_H__)
#define __AFX_STDAFX_H__

#if _MSC_VER > 1000
   #pragma once
#endif // _MSC_VER > 1000

#define VC_EXTRALEAN		// Exclude rarely-used stuff from Windows headers

#ifdef _DEBUG
   #define _CRTDBG_MAP_ALLOC // include Microsoft memory leak detection procedures
   #define _INC_MALLOC		  // exclude standard memory alloc procedures
#endif


#include <afx.h>
//#include <afxwin.h>         // MFC core and standard components


// TODO: reference additional headers your program requires here

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__BD9A6668_4A8C_4030_81D2_C0B990331DE5__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Technical Lead Doclogix
Lithuania Lithuania
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions