Quote:
Originally Posted by _pi
use NSLog to output strings
NSString has a class method called stringWithString that takes care of alloc, init and handling the release of the newly allocated string object.
As a rule of thumb: class methods that return a "ready-to-go" object also take care of memory management, so no need to call release on an object created through a class method.
Hope this helps.
|
Thank for the quick reply.
I understand what you are saying about "ready-to-go" object but not sure how I would use NSLog in my code. Can you demonstrate?
Cheers.