X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/36ba4665ff0d0cf36c2370a5ea2de50bec1e7fae..6dfec4b8d901b13f11745a1371083a0b8c1c6980:/demos/dbbrowse/doc.cpp diff --git a/demos/dbbrowse/doc.cpp b/demos/dbbrowse/doc.cpp index df2b80db46..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 DbStuff 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 //--------------------------------------------------------------------------------------- @@ -165,7 +168,7 @@ bool MainDoc::OnInitODBC() // The key will be removed after sorting wxString KeyString; //--------------------------------------------------------------------------------------- - while(GetDataSource(DbConnectInf.Henv, Dsn, sizeof(Dsn), DsDesc, sizeof(DsDesc))) + while(wxDbGetDataSource(DbConnectInf.Henv, Dsn, sizeof(Dsn), DsDesc, sizeof(DsDesc))) { i_DSN++; // How many Dsn have we ? KeyString.Printf("%s%c%s",Dsn, sep, DsDesc);