X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7be4c5946c4d0754cc5bb25e3d2906364df89227..7fe7d506b191a94ce327c2a18733a4d3bc576cac:/include/wx/object.h?ds=sidebyside diff --git a/include/wx/object.h b/include/wx/object.h index 4dd391fb06..2791952dcb 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -246,11 +246,19 @@ private: int m_count; }; -#if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS -// JACS: not necessary now that new can be defined globally -//#ifndef WXDEBUG_NEW -//#define WXDEBUG_NEW new(__FILE__,__LINE__) -//#endif +#ifdef __WXDEBUG__ +#ifndef WXDEBUG_NEW +#define WXDEBUG_NEW new(__FILE__,__LINE__) +#endif +#else +#define WXDEBUG_NEW new +#endif + +// Redefine new to be the debugging version. This doesn't +// work with all compilers, in which case you need to +// use WXDEBUG_NEW explicitly if you wish to use the debugging version. + +#if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS #define new new(__FILE__,__LINE__) #endif