From: beidson Date: Sat, 26 Aug 2006 00:37:05 +0000 (+0000) Subject: Reviewed by Tim Hatcher X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=7dfc5660a666d3c23a55570629c93c6b44ef5d5d Reviewed by Tim Hatcher 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 --- diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog index 95abf80562b8..5ec0c56a8f44 100644 --- a/WebKit/ChangeLog +++ b/WebKit/ChangeLog @@ -1,3 +1,12 @@ +2006-08-25 Brady Eidson + + Reviewed by Tim Hatcher + + Fixed up some leaks on [WebIconDatabase init] + + * Misc/WebIconDatabase.m: + (-[WebIconDatabase init]): + 2006-08-24 Timothy Hatcher Reviewed by Darin. diff --git a/WebKit/Misc/WebIconDatabase.m b/WebKit/Misc/WebIconDatabase.m index 894123e6bb02..56467993c9d2 100644 --- a/WebKit/Misc/WebIconDatabase.m +++ b/WebKit/Misc/WebIconDatabase.m @@ -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:)