> According to Cocoa/ObjC memory-management, if you get an object
> (reference) via "alloc","new",any object that contains "copy", and
> any object you send [<object> retain] to, is yours - it becomes your
> responsibility to call [<your object> release] on it when you're
> done. Ditto for properties like
> 
> @property (nonatomic,retain) <data type>myProp;
> 
> where "retain" is specified.
> 
> But what about literal NSStrings?

Did you get it via alloc, new or copyXXX ?

No?

No need to release it then!

No new rule to remember, no special case to worry about.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to