+// devik 2000-8-29: All new/delete ops are now inline because they can't
+// be marked as dllexport/dllimport. It then leads to weird bugs when
+// used on MSW as DLL
+#if defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))
+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);
+}
+#endif // wxUSE_ARRAY_MEMORY_OPERATORS