X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34138703c3997ce676a1e713d9ff9eb020640da7..321db4b6bf15df209942b9c0e6c744c8e7074d1b:/include/wx/memory.h diff --git a/include/wx/memory.h b/include/wx/memory.h index 9a17ad3ac9..8f5c81ae95 100644 --- a/include/wx/memory.h +++ b/include/wx/memory.h @@ -23,23 +23,27 @@ info, or to be a straight call to the new operator. */ -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT +#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT #include -#if USE_IOSTREAMH -#include +#if wxUSE_IOSTREAMH +# include #else -#include +# include +# ifdef _MSC_VER + using namespace std; +# endif #endif #include "wx/string.h" -#ifndef WXDEBUG_NEW -#define WXDEBUG_NEW new(__FILE__,__LINE__) -#endif - #if WXDEBUG + +// #ifndef WXDEBUG_NEW +// #define WXDEBUG_NEW new(__FILE__,__LINE__) +// #endif + void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool isVect = FALSE); void wxDebugFree(void * buf, bool isVect = FALSE); @@ -47,7 +51,7 @@ void wxDebugFree(void * buf, bool isVect = FALSE); // Currently, these merely call malloc and free; only the wxObject // operators do something interesting. But this allows WXDEBUG_NEW to // work for all 'new's in a file. -#if USE_GLOBAL_MEMORY_OPERATORS +#if wxUSE_GLOBAL_MEMORY_OPERATORS #ifdef new #undef new @@ -56,13 +60,16 @@ void wxDebugFree(void * buf, bool isVect = FALSE); void * operator new (size_t size, char * fileName, int lineNum); void operator delete (void * buf); -#if !( defined (_MSC_VER) && (_MSC_VER <= 1000) ) +// VC++ 6.0 +#if _MSC_VER >= 1200 +void operator delete(void *buf, char*, int); +#endif + +#if !( defined (_MSC_VER) && (_MSC_VER <= 1020) ) void * operator new[] (size_t size, char * fileName, int lineNum); void operator delete[] (void * buf); #endif -#define new WXDEBUG_NEW - #endif #endif @@ -270,7 +277,7 @@ inline void wxTraceLevel(int WXUNUSED(level), const char *WXUNUSED(fmt)) {} #define WXTRACE TRUE ? (void)0 : wxTrace #define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel -#define WXDEBUG_NEW new +// #define WXDEBUG_NEW new #endif // WXDEBUG