Reviewed by Darin's rubberstamp
[WebKit-https.git] / WebCore / loader / icon / IconDatabase.cpp
index 594f33f3835283561fd172d7607954ed198bd46d..74c68999b089f55302a6335b2dca2330e14f6da6 100644 (file)
@@ -172,10 +172,7 @@ void IconDatabase::removeAllIcons()
     m_pageURLToRetainCount.clear();
     m_iconURLToRetainCount.clear();
     
-    HashMap<String, IconDataCache*>::iterator i = m_iconURLToIconDataCacheMap.begin();
-    HashMap<String, IconDataCache*>::iterator end = m_iconURLToIconDataCacheMap.end();
-    for (; i != end; ++i)
-        delete i->second;
+    deleteAllValues(m_iconURLToIconDataCacheMap);
     m_iconURLToIconDataCacheMap.clear();
         
     // Wipe any pre-prepared statements, otherwise resetting the SQLDatabases themselves will fail