]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/memory.h
Added Motif files.
[wxWidgets.git] / include / wx / memory.h
index 840d5085ca49f5bc701282f90da99ea994e4fbf2..c1967741a975ae6d0bc6b03e0f8ac15240e00c7e 100644 (file)
@@ -9,8 +9,8 @@
 // Licence:    wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#ifndef __MEMORYH__
-#define __MEMORYH__
+#ifndef _WX_MEMORYH__
+#define _WX_MEMORYH__
 
 #ifdef __GNUG__
 #pragma interface "memory.h"
@@ -23,7 +23,7 @@
   info, or to be a straight call to the new operator.
 */
 
-#if (DEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
+#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
 
 #include <stddef.h>
 
 
 #include "wx/string.h"
 
-#ifndef WXDEBUG_NEW
-#define WXDEBUG_NEW new(__FILE__,__LINE__)
-#endif
+#if WXDEBUG
+
+// #ifndef WXDEBUG_NEW
+// #define WXDEBUG_NEW new(__FILE__,__LINE__)
+// #endif
 
-#if DEBUG
 void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool isVect = FALSE);
 void wxDebugFree(void * buf, bool isVect = FALSE);
 
@@ -56,10 +57,10 @@ void wxDebugFree(void * buf, bool isVect = FALSE);
 void * operator new (size_t size, char * fileName, int lineNum);
 void operator delete (void * buf);
 
+#if !( defined (_MSC_VER) && (_MSC_VER <= 1000) )
 void * operator new[] (size_t size, char * fileName, int lineNum);
 void operator delete[] (void * buf);
-
-#define new WXDEBUG_NEW
+#endif
 
 #endif
 #endif
@@ -261,17 +262,17 @@ void WXDLLEXPORT wxTraceLevel(int level, const char *fmt ...);
 #define WXTRACE wxTrace
 #define WXTRACELEVEL wxTraceLevel
 
-#else // else part for the #if DEBUG
+#else // else part for the #if WXDEBUG
 
 inline void wxTrace(const char *WXUNUSED(fmt)) {}
 inline void wxTraceLevel(int WXUNUSED(level), const char *WXUNUSED(fmt)) {}
 
 #define WXTRACE TRUE ? (void)0 : wxTrace
 #define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel
-#define WXDEBUG_NEW new
+// #define WXDEBUG_NEW new
 
-#endif // DEBUG
+#endif // WXDEBUG
 
 #endif
-    // __MEMORYH__
+    // _WX_MEMORYH__