Browse Source

[2852] Delete DataSourceClient objects before clearing the vector

Mukund Sivaraman 12 years ago
parent
commit
e58e863991
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/lib/datasrc/tests/client_list_unittest.cc

+ 4 - 0
src/lib/datasrc/tests/client_list_unittest.cc

@@ -138,7 +138,11 @@ public:
 
     ~ListTest() {
         ds_info_.clear();
+        for (size_t i(0); i < ds_count; ++ i) {
+            ds_[i].reset();
+        }
         ds_.clear();
+
         for (size_t i(0); i < ds_count; ++ i) {
             boost::interprocess::file_mapping::remove(
                 getMappedFilename(i).c_str());