Index: base/stl_util.h |
diff --git a/base/stl_util.h b/base/stl_util.h |
index b8683377bb7872c711c4bc5bef21a19db87bcf29..b762b9fe0c15b143054420f9ffc6ea03847322a5 100644 |
--- a/base/stl_util.h |
+++ b/base/stl_util.h |
@@ -110,7 +110,14 @@ template <class T> |
void STLDeleteValues(T* container) { |
if (!container) |
return; |
- STLDeleteContainerPairSecondPointers(container->begin(), container->end()); |
+ |
+ auto it = container->begin(); |
+ while (it != container->end()) { |
+ auto temp = it; |
+ ++it; |
+ delete temp->second; |
+ } |
+ |
container->clear(); |
} |