Updates to memcheck

Corrected and beautified memory (output)
  Fixed a few memory leaks
  Fixed resizing in in wxRadioBox
  Added many wxFAIL and wxASSERT
  Corrected other wxFAIL (removed from ..::Ok())
  Added wxBrush::Set..() functions
  Added CopyOnWrite support in GDI objects (Unshare)
  Disabled all occurences of WXDEBUG_NEW
  made clean, recompiled with mem_chcking on


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-09-11 09:05:26 +00:00
parent 384b4373c7
commit e55ad60e19
46 changed files with 1087 additions and 379 deletions

View File

@@ -293,8 +293,6 @@ void wxApp::CommonCleanUp(void)
wxCleanUpResourceSystem();
wxSystemSettings::Done();
wxClassInfo::CleanUpClasses();
}
wxLog *wxApp::CreateLogTarget()
@@ -314,11 +312,7 @@ int wxEntry( int argc, char *argv[] )
#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
#if !defined(_WINDLL)
streambuf* sBuf = new wxDebugStreamBuf;
#else
streambuf* sBuf = NULL;
#endif
ostream* oStr = new ostream(sBuf) ;
wxDebugContext::SetStream(oStr, sBuf);
@@ -348,6 +342,12 @@ int wxEntry( int argc, char *argv[] )
wxTheApp->argc = argc;
wxTheApp->argv = argv;
char name[200];
strcpy( name, argv[0] );
strcpy( name, wxFileNameFromPath(name) );
wxStripExtension( name );
wxTheApp->SetAppName( name );
gtk_set_locale();
gtk_init( &argc, &argv );
@@ -386,11 +386,15 @@ int wxEntry( int argc, char *argv[] )
wxDELETE(wxTheApp);
wxLog *oldLog = wxLog::SetActiveTarget( NULL );
if (oldLog) delete oldLog;
wxClassInfo::CleanUpClasses();
delete[] wxBuffer;
#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
// At this point we want to check if there are any memory
// blocks that aren't part of the wxDebugContext itself,
// as a special case. Then when dumping we need to ignore
// wxDebugContext, too.
if (wxDebugContext::CountObjectsLeft() > 0)
{
wxTrace("There were memory leaks.\n");
@@ -398,6 +402,7 @@ int wxEntry( int argc, char *argv[] )
wxDebugContext::PrintStatistics();
}
wxDebugContext::SetStream(NULL, NULL);
#endif
return retValue;