# endif
#endif
-#if !defined(__WATCOMC__) && !defined(__VMS__)
+#if !defined(__WATCOMC__) && !defined(__VMS__) && !defined( __MWERKS__ ) && !defined(__SALFORDC__)
#include <memory.h>
#endif
bool wxDebugContext::SetStandardError(void)
{
+ // Obsolete
+#if 0
#if !defined(_WINDLL)
wxDebugStreamBuf *buf = new wxDebugStreamBuf;
ostream *stream = new ostream(m_streamBuf);
#else
return FALSE;
#endif
+#endif
+ return FALSE;
}
// Count the number of non-wxDebugContext-related objects
// that are outstanding
-int wxDebugContext::CountObjectsLeft(void)
+int wxDebugContext::CountObjectsLeft(bool sinceCheckpoint)
{
int n = 0;
-
- wxMemStruct *from = wxDebugContext::GetHead ();
+
+ wxMemStruct *from = NULL;
+ if (sinceCheckpoint && checkPoint)
+ from = checkPoint->m_next;
+ else
+ from = wxDebugContext::GetHead () ;
for (wxMemStruct * st = from; st != 0; st = st->m_next)
{
#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;