X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df1f4832e5e08438255594172b4c2b31b34f6453..b7a496541327a8a86a147112fc4623aa9df19de8:/src/common/memory.cpp diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 9e6c3beaed..90812da1f1 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -917,6 +917,9 @@ static MemoryCriticalSection memLocker; #endif +#if !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))) +#ifdef __WXDEBUG__ +#if wxUSE_GLOBAL_MEMORY_OPERATORS void * operator new (size_t size, wxChar * fileName, int lineNum) { return wxDebugAlloc(size, fileName, lineNum, false, false); @@ -947,7 +950,9 @@ void operator delete[] (void * buf) { wxDebugFree(buf, true); } -#endif +#endif // wxUSE_ARRAY_MEMORY_OPERATORS +#endif // !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))) +#endif // wxUSE_GLOBAL_MEMORY_OPERATORS // 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 +1064,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 * ...) {