Q:

Can you send retain counts to NSLog to aid learning?

Just curious if there is anyway to display an objects retain count using NSLog. I just want to print them out to console to help learn how retain/release is working in some simple code?
cheers -gary-

A:

Not only is it possible, it's very easy too:
NSLog(@"retain count=%d",[obj retainCount]);

