diff Framework/Common/Dictionary.cpp @ 305:87f0e29a1dc1

added Dictionary::Clear()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 12 Jul 2021 09:40:01 +0200
parents 02cd7254c949
children 16aac0287485
line wrap: on
line diff
--- a/Framework/Common/Dictionary.cpp	Fri Jul 09 17:23:24 2021 +0200
+++ b/Framework/Common/Dictionary.cpp	Mon Jul 12 09:40:01 2021 +0200
@@ -34,7 +34,7 @@
 
 namespace OrthancDatabases
 {
-  Dictionary::~Dictionary()
+  void Dictionary::Clear()
   {
     for (Values::iterator it = values_.begin(); 
          it != values_.end(); ++it)
@@ -42,8 +42,10 @@
       assert(it->second != NULL);
       delete it->second;
     }
+
+    values_.clear();
   }
-
+  
 
   bool Dictionary::HasKey(const std::string& key) const
   {