I'm just learning Obj-C/Cocoa, and am spending as much time as I can on the section on retain/release, so I fully understand it.
I'm trying to print out an object's retainCount, but it keeps printing as:
2008-07-16 00:59:42.872 Learn[7227:10b] retainCount = 2147483647
What am I doing wrong? Below is the relevant part of the code.
I'm trying to print out an object's retainCount, but it keeps printing as:
2008-07-16 00:59:42.872 Learn[7227:10b] retainCount = 2147483647
What am I doing wrong? Below is the relevant part of the code.
Code:
- (IBAction) doit: (id)sender
{
NSString *hi = @"Here's a test";
NSLog(@"retainCount = %d", [hi retainCount]);
}