bad delete operator, should be delete [] for gs_FSMimeFallbacks and removing debug allocs and deallocs for OS/2 in memory.cpp

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2000-11-15 04:58:06 +00:00
parent 79a4c912b5
commit 86b3203fb1
2 changed files with 33 additions and 25 deletions

View File

@@ -450,7 +450,7 @@ class wxFileSystemModule : public wxModule
} }
virtual void OnExit() virtual void OnExit()
{ {
delete gs_FSMimeFallbacks; delete [] gs_FSMimeFallbacks;
wxFileSystem::CleanUpHandlers(); wxFileSystem::CleanUpHandlers();
} }
}; };

View File

@@ -951,6 +951,10 @@ void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject,
// If not in debugging allocation mode, do the normal thing // If not in debugging allocation mode, do the normal thing
// so we don't leave any trace of ourselves in the node list. // so we don't leave any trace of ourselves in the node list.
#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )
// VA 3.0 still has trouble in here
return (void *)malloc(size);
#endif
if (!wxDebugContext::GetDebugMode()) if (!wxDebugContext::GetDebugMode())
{ {
return (void *)malloc(size); return (void *)malloc(size);
@@ -1003,6 +1007,10 @@ void wxDebugFree(void * buf, bool WXUNUSED(isVect) )
if (!buf) if (!buf)
return; return;
#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )
// VA 3.0 still has trouble in here
free((char *)buf);
#endif
// If not in debugging allocation mode, do the normal thing // If not in debugging allocation mode, do the normal thing
// so we don't leave any trace of ourselves in the node list. // so we don't leave any trace of ourselves in the node list.
if (!wxDebugContext::GetDebugMode()) if (!wxDebugContext::GetDebugMode())