diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 9e6c3beaed..a6a4a32d50 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -917,6 +917,8 @@ static MemoryCriticalSection memLocker; #endif +#ifdef __WXDEBUG__ +#if wxUSE_GLOBAL_MEMORY_OPERATORS void * operator new (size_t size, wxChar * fileName, int lineNum) { return wxDebugAlloc(size, fileName, lineNum, false, false); @@ -1059,6 +1061,9 @@ void wxDebugFree(void * buf, bool WXUNUSED(isVect) ) free((char *)st); } +#endif // wxUSE_GLOBAL_MEMORY_OPERATORS +#endif // __WXDEBUG__ + // Trace: send output to the current debugging stream void wxTrace(const wxChar * ...) {