Retain count = 0 in other function? memory-management problem?
Posted
by rdesign
on Stack Overflow
See other posts from Stack Overflow
or by rdesign
Published on 2010-06-13T20:37:44Z
Indexed on
2010/06/13
20:42 UTC
Read the original article
Hit count: 253
Hey guys,
I declared a NSMutableArray in the header-file with:
NSMutableArray *myMuArr;
and
@property (nonatomic, retain) NSMutableArray *myMuArr;
In the .m file I've got a delegate from an other class:
-(void)didGrabData:(NSArray*)theArray {
self.myMuArr = [[[NSMutableArray alloc] initWithArray:myMuArr]retain];
}
If I want to access the self.myMuArr in cellForRowAtIndexPath it's empty (I checked the retain count of the array and it's 0)
What am I doing wrong?
Of course it's released in the dealloc, no where else.
I would be very thankfull for any help :0)
© Stack Overflow or respective owner