Permalink
Browse files

Fix all compile errors and analyzer warnings.

These could only be seen under non-ARC and are real issues.
  • Loading branch information...
1 parent 64f8b6d commit 04d686105684447d0f2f3434ef5d09063d393886 @crayment crayment committed Dec 7, 2011
View
2 Source/Categories/NSManagedObjectModel+MagicalRecord.m
@@ -39,7 +39,7 @@ + (NSManagedObjectModel *) MR_mergedObjectModelFromMainBundle;
+ (NSManagedObjectModel *) MR_newManagedObjectModel
{
NSManagedObjectModel *model = [self MR_mergedObjectModelFromMainBundle];
- MR_AUTORELEASE(model);
+ MR_RETAIN(model);
return model;
}
View
1 Source/Categories/NSPersistentStore+MagicalRecord.m
@@ -67,6 +67,7 @@ + (NSURL *) MR_cloudURLForUbiqutiousContainer:(NSString *)bucketName;
NSFileManager *fileManager = [[NSFileManager alloc] init];
NSURL *cloudURL = [fileManager URLForUbiquityContainerIdentifier:bucketName];
+ MR_AUTORELEASE(fileManager);
return cloudURL;
}
View
4 Source/Categories/NSPersistentStoreCoordinator+MagicalRecord.m
@@ -136,7 +136,7 @@ + (NSPersistentStoreCoordinator *) MR_coordinatorWithInMemoryStore
NSPersistentStoreCoordinator *psc = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:model];
[psc MR_addInMemoryStore];
- MR_AUTORELEASE(coordinator);
+ MR_AUTORELEASE(psc);
return psc;
}
@@ -263,7 +263,7 @@ - (NSMutableDictionary *) MR_dictionaryByMergingDictionary:(NSDictionary *)d;
{
NSMutableDictionary *mutDict = [self mutableCopy];
[mutDict addEntriesFromDictionary:d];
- return mutDict;
+ return MR_AUTORELEASE(mutDict);
}
@end

0 comments on commit 04d6861

Please sign in to comment.