From a36be7f6f3540ffd99ae0eb50a36002f06c27be5 Mon Sep 17 00:00:00 2001 From: randomdan Date: Sat, 19 Feb 2011 17:01:55 +0000 Subject: Use a smart pointer to ensure sqlRows query handle is always deleted Add CommonObjects destructor to ensure rowSets are cleared before datasources --- project2/commonObjects.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'project2/commonObjects.cpp') diff --git a/project2/commonObjects.cpp b/project2/commonObjects.cpp index 2ca4846..89eb913 100644 --- a/project2/commonObjects.cpp +++ b/project2/commonObjects.cpp @@ -2,6 +2,12 @@ #include #include +CommonObjects::~CommonObjects() +{ + rowSets.clear(); + datasources.clear(); +} + RowSetPtr CommonObjects::getSource(const std::string & name) const { -- cgit v1.2.3