Based on the following code, please advise
NSString *str= [[NSString alloc] initWithString:@"Hello world"];   
NSLog(@"Length: %lu\n", [str length]);              // 11
NSLog(@"Retain count is %lu\n", [str retainCount]); //1152921504606846975
[str release];
NSLog(@"%lu\n", [str length]);                      // 11
NSLog(@"Retain count is %lu\n", [str retainCount]); //1152921504606846975
- Originally I was wondering why the number was so large but then saw a a post explaining it. Let me ask this instead ... Why does this number change greatly whether i use - %dvs- %lu. Originally, i used- %d, but got a warning saying that "Conversion specified type int but the argument has the type NSUInteger (aka unsigned long). A fix was to change- %dto- %lu"
- Why doesn't the retain count decrement? Large number still shows up unchanged, after the - stris sent- release
- Why am i still able to access the - str, after it was sent- release?
 
     
     
    