I have a question about how best to manage array pointers to ensure no memory leaks happen. I have a container class A and a composited class B. Both have an array property, and both do their own thing to the array. But the container is the only class exposed to the public API. so I set classA.someProperty and it internally sets classB.someProperty like below. What kind of cleanup work do I need to do? Will ARC take care of this for me automagically?
class A
@property(nonatomic,strong) NSMutableArray* someProperty;
@property(nonatomic,strong) ClassB* classB;
Class B
@property(nonatomic,strong) NSMutableArray someProperty;
and in the implementation in Class A;
classB.someProperty = [self.someProperty mutableCopy]
//do some other work with self.someProperty
and in the implementation in Class B;
//do some work with self.someProperty [Includes modifications to the array]