> > If a Cocoa method name doesn't begin with “alloc”, “new”, “copy”, or > “mutableCopy”, then the returned object is autoreleased. > > Thanks, Dave. That's what I thought. But I don't understand why I need to retain it then; it's assigned to a member pointer. Why does it get released, and when? If I call retain on it, do I have to call release on it later?
I create another NSDate, on the stack, to hold "now" for use within that function. Do I need to retain that too? If not, why not? _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
