Skip to content

Commit

Permalink
Cleanup of two memory leaks, as detected by Analyze.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhugman committed Oct 5, 2012
1 parent 9e176b9 commit e6b8a65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platforms/ios/KirinKit/KirinKit/Extensions/SettingsBackend.m
Expand Up @@ -53,7 +53,7 @@ - (NSDictionary*) settingsAsDictionary {
// Returns a dictionary of all the pairs in NSUserDefaults
// whose keys begin with "kirin-"
NSDictionary* settings = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation];
NSMutableDictionary* kirinSettings = [[NSMutableDictionary alloc] init];
NSMutableDictionary* kirinSettings = [NSMutableDictionary dictionary];

for (id key in settings) {
if ([key hasPrefix:@"kirin-"]) {
Expand All @@ -78,7 +78,7 @@ - (void)updateContents:(NSDictionary *)adds withDeletes:(NSArray *)deletes
if([adds isKindOfClass:[NSDictionary class]]) {
// Make a separate dictionary of all the keys with "kirin-"
// stuck on the front.
NSMutableDictionary* kirinAdds = [[NSMutableDictionary alloc] init];
NSMutableDictionary* kirinAdds = [NSMutableDictionary dictionary];
for (id key in adds) {
id value = [adds objectForKey:key];
[kirinAdds setValue:value forKey:[NSString stringWithFormat:@"kirin-%@", key]];
Expand Down

0 comments on commit e6b8a65

Please sign in to comment.