X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df991b9dfb98e8b65c5c806d96b991f8d6c8f55b..e7fa076d947d52b2572d7ea9d623d1b31171861a:/demos/dbbrowse/doc.cpp diff --git a/demos/dbbrowse/doc.cpp b/demos/dbbrowse/doc.cpp index 73d2936504..59acac8256 100644 --- a/demos/dbbrowse/doc.cpp +++ b/demos/dbbrowse/doc.cpp @@ -33,7 +33,7 @@ //---------------------------------------------------------------------------------------- //-- Some Global Vars for all Files (extern in ?.h needed) ------------------------------- // Global structure for holding ODBC connection information -struct wxDbConnectInf DbConnectInf; +wxDbConnectInf DbConnectInf; //---------------------------------------------------------------------------------------- wxConfigBase *p_ProgramCfg; // All Config and Path information wxLogTextCtrl *p_LogBook; // All Log messages @@ -63,7 +63,8 @@ MainDoc::~MainDoc() // ---------------------------------------------------------- // -E-> The Tree Controls take to long to close : Why ?? // ---------------------------------------------------------- - // wxMessageBox("-I-> end Doc"); + delete ft_Doc; + ft_Doc = NULL; p_TabArea->Show(FALSE); // Deactivate the Window p_PageArea->Show(FALSE); // Deactivate the Window p_PgmCtrl = NULL; @@ -108,6 +109,8 @@ bool MainDoc::OnInitView() wxBitmap *p_FolderClose = new wxBitmap("PgmCtrl"); //, wxBITMAP_TYPE_BMP_RESOURCE); // BJO20000115 //--------------------------------------------------------------------------------------- p_TabArea->AddTab(p_PgmCtrl,"PgmCtrl",p_FolderClose); + delete p_FolderClose; // Memory leak + p_FolderClose = NULL; //--------------------------------------------------------------------------------------- // now create "output" window //---------------------------------------------------------------------------------------