I received this error message:
message [CFString release] sent to deallocated object at 0x........
How can I know which string caused this problem? Can I figure out which CFString
it is using the debugger?
I received this error message:
message [CFString release] sent to deallocated object at 0x........
How can I know which string caused this problem? Can I figure out which CFString
it is using the debugger?
If you are using XCode 4, use the Zombie instrument (Build and Profile). When this message occurs, you can press the arrow to get a list of everywhere the string was retained and released.
See http://www.cocoadev.com/index.pl?NSZombieEnabled to put in a breakpoint and look back up the stack to find release statement where it occurred.
At firts, you can try lookup your code for alloc/dealloc functions, and count it.
It's has been as "count alloc == count dealloc".
The second step, look for some construction:
NSString *myString = [NSString stringWith...]; // Auto alloc/init with content
[myString release]; // Release before use
NSLog(@"%@", myString); // Use after release
Or try debug with NSLog(%"retain count :%d", [myString retainCount]);