diff --git a/src/common/db.cpp b/src/common/db.cpp index b5e46f5b89..8403a4ca42 100644 --- a/src/common/db.cpp +++ b/src/common/db.cpp @@ -1658,7 +1658,7 @@ void wxDb::Close(void) #ifdef __WXDEBUG__ wxTablesInUse *tiu; - wxNode *pNode; + wxList::compatibility_iterator pNode; pNode = TablesInUse.GetFirst(); wxString s,s2; while (pNode) diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index 56a496d843..1657a14c98 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -321,18 +321,17 @@ void wxDbTable::cleanup() #ifdef __WXDEBUG__ if (tableID) { - TablesInUse.DeleteContents(TRUE); bool found = FALSE; - wxNode *pNode; + wxList::compatibility_iterator pNode; pNode = TablesInUse.GetFirst(); while (pNode && !found) { if (((wxTablesInUse *)pNode->GetData())->tableID == tableID) { found = TRUE; - if (!TablesInUse.DeleteNode(pNode)) - wxLogDebug (s,wxT("Unable to delete node!")); + delete (wxTablesInUse *)pNode->GetData(); + TablesInUse.Erase(pNode); } else pNode = pNode->GetNext();