X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df1f4832e5e08438255594172b4c2b31b34f6453..27c78e4552aaefac9a4db0d4453eff09cdfef2ad:/src/common/memory.cpp diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 9e6c3beaed..1a6fae329d 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "memory.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -26,10 +22,6 @@ #if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -// #pragma implementation -#endif - #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/app.h" @@ -915,8 +907,12 @@ private: static MemoryCriticalSection memLocker; -#endif +#endif // USE_THREADSAFE_MEMORY_ALLOCATION + +#ifdef __WXDEBUG__ +#if !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))) +#if wxUSE_GLOBAL_MEMORY_OPERATORS void * operator new (size_t size, wxChar * fileName, int lineNum) { return wxDebugAlloc(size, fileName, lineNum, false, false); @@ -947,7 +943,9 @@ void operator delete[] (void * buf) { wxDebugFree(buf, true); } -#endif +#endif // wxUSE_ARRAY_MEMORY_OPERATORS +#endif // wxUSE_GLOBAL_MEMORY_OPERATORS +#endif // !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))) // TODO: store whether this is a vector or not. void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool WXUNUSED(isVect) ) @@ -1059,6 +1057,8 @@ void wxDebugFree(void * buf, bool WXUNUSED(isVect) ) free((char *)st); } +#endif // __WXDEBUG__ + // Trace: send output to the current debugging stream void wxTrace(const wxChar * ...) {