@@ -25,8 +25,8 @@ @implementation NSObject_KVCArrayForwarding {
2525- (id )initWithTarget : (id )theTarget keyPath : (NSString *)theKeyPath isMutable : (BOOL )isMutable
2626{
2727 if (self = [super init ]) {
28- target = [ theTarget retain ] ;
29- keyPath = [ theKeyPath retain ] ;
28+ target = theTarget;
29+ keyPath = theKeyPath;
3030 NSString * KeyPath = keyPath.capitalizedString ;
3131
3232 Class class = [self class ];
@@ -41,10 +41,10 @@ - (id)initWithTarget:(id)theTarget keyPath:(NSString *)theKeyPath isMutable:(BOO
4141 if (subclass == nil )
4242 return nil ;
4343
44- class_addMethod (subclass,
45- @selector (dealloc ),
46- [class instanceMethodForSelector: @selector (dealloc )],
47- " v@:" );
44+ // class_addMethod(subclass,
45+ // @selector(dealloc),
46+ // [class instanceMethodForSelector:@selector(dealloc)],
47+ // "v@:");
4848
4949 class_addMethod (subclass,
5050 NSSelectorFromString ([NSString stringWithFormat: @" countOf%@ " , KeyPath]),
@@ -105,13 +105,6 @@ - (id)initWithTarget:(id)theTarget keyPath:(NSString *)theKeyPath isMutable:(BOO
105105 return self;
106106}
107107
108- - (void )dealloc
109- {
110- [target release ];
111- [keyPath release ];
112-
113- [super dealloc ];
114- }
115108
116109- (NSArray *)arrayProperty
117110{
@@ -144,7 +137,7 @@ - (NSArray *)arrayObjectsAtIndexes:(NSIndexSet *)indexes
144137 return [self .arrayProperty objectsAtIndexes: indexes];
145138}
146139
147- - (void )getArrayObjects : (id *)buffer range : (NSRange )inRange
140+ - (void )getArrayObjects : (__unsafe_unretained id *)buffer range : (NSRange )inRange
148141{
149142 [self .arrayProperty getObjects: buffer range: inRange];
150143}
0 commit comments