-// VC++ 6.0
-#if _MSC_VER >= 1200
-void operator delete(void *buf, char*, int);
-void operator delete[](void *buf, char*, int);
+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);
+}