> > I create another NSDate, on the stack, to hold "now" for use within that > function. Do I need to retain that too? > > > Yes. > > Hm, Apple's doc says: "Cocoa’s ownership policy specifies that received objects should typically remain valid throughout the scope of the calling method."
This leads me to believe that the object created by [NSDate date] within that method will remain valid throughout the method. Thanks for the info. I read the memory-management doc a long time ago but apparently didn't learn everything about autorelease. I never use it in my own code. _______________________________________________ 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]
