mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-28 20:55:32 +08:00
Convert RestKit to ARC
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#import "RKEntityByAttributeCache.h"
|
||||
|
||||
@interface RKEntityCache ()
|
||||
@property (nonatomic, retain) NSMutableSet *attributeCaches;
|
||||
@property (nonatomic, strong) NSMutableSet *attributeCaches;
|
||||
@end
|
||||
|
||||
@implementation RKEntityCache
|
||||
@@ -23,7 +23,7 @@
|
||||
NSAssert(context, @"Cannot initialize entity cache with a nil context");
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_managedObjectContext = [context retain];
|
||||
_managedObjectContext = context;
|
||||
_attributeCaches = [[NSMutableSet alloc] init];
|
||||
}
|
||||
|
||||
@@ -35,12 +35,6 @@
|
||||
return [self initWithManagedObjectContext:nil];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_managedObjectContext release];
|
||||
[_attributeCaches release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)cacheObjectsForEntity:(NSEntityDescription *)entity byAttribute:(NSString *)attributeName
|
||||
{
|
||||
@@ -53,7 +47,6 @@
|
||||
attributeCache = [[RKEntityByAttributeCache alloc] initWithEntity:entity attribute:attributeName managedObjectContext:self.managedObjectContext];
|
||||
[attributeCache load];
|
||||
[self.attributeCaches addObject:attributeCache];
|
||||
[attributeCache release];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user