# endif
#endif
-#if !defined(__WATCOMC__) && !defined(__VMS__)
+#if !defined(__WATCOMC__) && !defined(__VMS__) && !defined( __MWERKS__ )
#include <memory.h>
#endif
#endif
}
+#if wxUSE_ARRAY_MEMORY_OPERATORS
void * operator new[] (size_t size)
{
#ifdef NO_DEBUG_ALLOCATION
return wxDebugAlloc(size, NULL, 0, FALSE, TRUE);
#endif
}
+#endif
-#if !( defined (_MSC_VER) && (_MSC_VER <= 1020) )
+#if wxUSE_ARRAY_MEMORY_OPERATORS
void * operator new[] (size_t size, char * fileName, int lineNum)
{
#ifdef NO_DEBUG_ALLOCATION
}
#endif
-#if !( defined (_MSC_VER) && (_MSC_VER <= 1020) )
+#if wxUSE_ARRAY_MEMORY_OPERATORS
void operator delete[] (void * buf)
{
return (void *)malloc(size);
}
- char * buf = (char *) malloc(wxDebugContext::TotSize (size));
+ int totSize = wxDebugContext::TotSize (size);
+ char * buf = (char *) malloc(totSize);
if (!buf) {
wxLogDebug("Call to malloc (%ld) failed.", (long)size);
return 0;