Reviewed by Tim Hatcher
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Aug 2006 00:37:05 +0000 (00:37 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Aug 2006 00:37:05 +0000 (00:37 +0000)
        Fixed up some leaks on [WebIconDatabase init]

        * Misc/WebIconDatabase.m:
        (-[WebIconDatabase init]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16046 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/Misc/WebIconDatabase.m

index 95abf80562b89a8c699b71350e2e610659e47fe9..5ec0c56a8f44add68eaed538a5b48537670c5284 100644 (file)
@@ -1,3 +1,12 @@
+2006-08-25  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Tim Hatcher
+
+        Fixed up some leaks on [WebIconDatabase init]
+
+        * Misc/WebIconDatabase.m:
+        (-[WebIconDatabase init]):
+
 2006-08-24  Timothy Hatcher  <timothy@apple.com>
 
         Reviewed by Darin.
index 894123e6bb02954790a819e3d38f2f94f7d041a4..56467993c9d2b4f9577e4f9e8a5e4d44cbfa1fe5 100644 (file)
@@ -112,6 +112,17 @@ NSSize WebIconLargeSize = {128, 128};
     }
     
     [self _createFileDatabase];
+    
+    _private->iconURLToIcons = [[NSMutableDictionary alloc] init];
+    _private->iconURLToExtraRetainCount = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, NULL);
+    _private->pageURLToRetainCount = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, NULL);
+    _private->iconsToEraseWithURLs = [[NSMutableSet alloc] init];
+    _private->iconsToSaveWithURLs = [[NSMutableSet alloc] init];
+    _private->iconURLsWithNoIcons = [[NSMutableSet alloc] init];
+    _private->iconURLsBoundDuringPrivateBrowsing = [[NSMutableSet alloc] init];
+    _private->pageURLsBoundDuringPrivateBrowsing = [[NSMutableSet alloc] init];
+    _private->privateBrowsingEnabled = [[WebPreferences standardPreferences] privateBrowsingEnabled];
+    
     [self _loadIconDictionaries];
 
 #ifdef ICONDEBUG
@@ -130,16 +141,6 @@ NSSize WebIconLargeSize = {128, 128};
     
     [self _convertToWebCoreFormat];
 #endif
-
-    _private->iconURLToIcons = [[NSMutableDictionary alloc] init];
-    _private->iconURLToExtraRetainCount = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, NULL);
-    _private->pageURLToRetainCount = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, NULL);
-    _private->iconsToEraseWithURLs = [[NSMutableSet alloc] init];
-    _private->iconsToSaveWithURLs = [[NSMutableSet alloc] init];
-    _private->iconURLsWithNoIcons = [[NSMutableSet alloc] init];
-    _private->iconURLsBoundDuringPrivateBrowsing = [[NSMutableSet alloc] init];
-    _private->pageURLsBoundDuringPrivateBrowsing = [[NSMutableSet alloc] init];
-    _private->privateBrowsingEnabled = [[WebPreferences standardPreferences] privateBrowsingEnabled];
     
     [[NSNotificationCenter defaultCenter] addObserver:self
                                              selector:@selector(_applicationWillTerminate:)