Skip to content

Commit fbdf5ef

Browse files
author
beidson
committed
Reviewed by Tim Hatcher
Fixed up some leaks on [WebIconDatabase init] * Misc/WebIconDatabase.m: (-[WebIconDatabase init]): Canonical link: https://commits.webkit.org/13442@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 450652c commit fbdf5ef

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

WebKit/ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2006-08-25 Brady Eidson <beidson@apple.com>
2+
3+
Reviewed by Tim Hatcher
4+
5+
Fixed up some leaks on [WebIconDatabase init]
6+
7+
* Misc/WebIconDatabase.m:
8+
(-[WebIconDatabase init]):
9+
110
2006-08-24 Timothy Hatcher <timothy@apple.com>
211

312
Reviewed by Darin.

WebKit/Misc/WebIconDatabase.m

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,17 @@ + (WebIconDatabase *)sharedIconDatabase
112112
}
113113

114114
[self _createFileDatabase];
115+
116+
_private->iconURLToIcons = [[NSMutableDictionary alloc] init];
117+
_private->iconURLToExtraRetainCount = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, NULL);
118+
_private->pageURLToRetainCount = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, NULL);
119+
_private->iconsToEraseWithURLs = [[NSMutableSet alloc] init];
120+
_private->iconsToSaveWithURLs = [[NSMutableSet alloc] init];
121+
_private->iconURLsWithNoIcons = [[NSMutableSet alloc] init];
122+
_private->iconURLsBoundDuringPrivateBrowsing = [[NSMutableSet alloc] init];
123+
_private->pageURLsBoundDuringPrivateBrowsing = [[NSMutableSet alloc] init];
124+
_private->privateBrowsingEnabled = [[WebPreferences standardPreferences] privateBrowsingEnabled];
125+
115126
[self _loadIconDictionaries];
116127

117128
#ifdef ICONDEBUG
@@ -130,16 +141,6 @@ + (WebIconDatabase *)sharedIconDatabase
130141

131142
[self _convertToWebCoreFormat];
132143
#endif
133-
134-
_private->iconURLToIcons = [[NSMutableDictionary alloc] init];
135-
_private->iconURLToExtraRetainCount = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, NULL);
136-
_private->pageURLToRetainCount = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, NULL);
137-
_private->iconsToEraseWithURLs = [[NSMutableSet alloc] init];
138-
_private->iconsToSaveWithURLs = [[NSMutableSet alloc] init];
139-
_private->iconURLsWithNoIcons = [[NSMutableSet alloc] init];
140-
_private->iconURLsBoundDuringPrivateBrowsing = [[NSMutableSet alloc] init];
141-
_private->pageURLsBoundDuringPrivateBrowsing = [[NSMutableSet alloc] init];
142-
_private->privateBrowsingEnabled = [[WebPreferences standardPreferences] privateBrowsingEnabled];
143144

144145
[[NSNotificationCenter defaultCenter] addObserver:self
145146
selector:@selector(_applicationWillTerminate:)

0 commit comments

Comments
 (0)