-#if !( defined (_MSC_VER) && (_MSC_VER <= 1020) )
-void * operator new[] (size_t size, char * fileName, int lineNum);
-void operator delete[] (void * buf);
+inline void * operator new (size_t size, wxChar * fileName, int lineNum)
+{
+ return wxDebugAlloc(size, fileName, lineNum, false, false);
+}
+
+inline void * operator new (size_t size)
+{
+ return wxDebugAlloc(size, NULL, 0, false);
+}
+
+inline void operator delete (void * buf)
+{
+ wxDebugFree(buf, false);
+}
+
+#if wxUSE_ARRAY_MEMORY_OPERATORS
+inline void * operator new[] (size_t size)
+{
+ return wxDebugAlloc(size, NULL, 0, false, true);
+}
+
+inline void * operator new[] (size_t size, wxChar * fileName, int lineNum)
+{
+ return wxDebugAlloc(size, fileName, lineNum, false, true);
+}
+
+inline void operator delete[] (void * buf)
+{
+ wxDebugFree(buf, true);
+}