Permalink
Browse files

Update NSManagedObjectContext-EasyFetch.m

  • Loading branch information...
1 parent 5dd0498 commit 6589fd2a837b697e682080a20d9f7262f6c67051 @halostatue committed Jan 26, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 NSManagedObjectContext-EasyFetch.m
View
6 NSManagedObjectContext-EasyFetch.m
@@ -112,7 +112,7 @@ - (NSArray*)fetchObjectsForEntityName:(NSString*)entityName
NSFetchRequest* request = [[NSFetchRequest alloc] init];
#if !__has_feature(objc_arc)
- [request retain];
+ [request autorelease];
#endif
[request setEntity:entity];
@@ -130,10 +130,6 @@ - (NSArray*)fetchObjectsForEntityName:(NSString*)entityName
NSError* error = nil;
NSArray* results = [self executeFetchRequest:request error:&error];
-#if !__has_feature(objc_arc)
- [request release];
-#endif
-
if (error != nil)
{
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);

0 comments on commit 6589fd2

Please sign in to comment.