I used codes below and set the breakpoint at a1, a2
NSMutableArray *aArray;
.....
@property (nonatomic,retain) NSMutableArray *aArray;
......
NSMutableArray* a=[[NSMutableArray alloc]init] ;
for(int i=1;i<=31;i++)
[a addObject:[NSNumber numberWithInt:i]];
aArray=a;
[a release];// a1
int i=0;// a2
the amount of objects in aArray is 31 but afeter the line [a release], the amount changes to 0
As I know 'release' only make the retain counter -1, but why it also removes all objects in the MutableArray?
Welcone any comment
Thanks
interdev