Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleanup of two memory leaks, as detected by Analyze.

  • Loading branch information...
commit e6b8a6556e6316aa2232aaf22ffb3582dcd2337e 1 parent 9e176b9
jhugman authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 platforms/ios/KirinKit/KirinKit/Extensions/SettingsBackend.m
View
4 platforms/ios/KirinKit/KirinKit/Extensions/SettingsBackend.m
@@ -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-"]) {
@@ -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]];
Please sign in to comment.
Something went wrong with that request. Please try again.