Weird problem ... Memory leak ?
Hi,
I have a navigation controller with tableview. and I am trying to print this statement:
NSLog(@"Checking element %@", [[self.array objectAtIndex:0] name]);
This works if I put at the end of init and viewDidLoad functions.
When I put it at the beginning of cellForRowAtIndexPath function,
it prints "(" instead of the actual value.
Where am I going wrong ? I couldn't understand.
array is a member variable (NSMuttableArray).
From what I have noticed is, it works fine when I use stringWithString to copy strings but gives above problem when I use stringWithFormat to copy strings.
Are there any differences between these methods ?
Thanks,
|