Re: (no subject)
Re: (no subject)
- Subject: Re: (no subject)
- From: Bryan Henry <email@hidden>
- Date: Mon, 07 Sep 2009 18:30:33 -0400
According to the memory management rules, yes, you own the object
returned by that method and you should therefore release it.
"You take ownership of an object if you create it using a method whose
name begins with “alloc” or “new” or contains “copy” (for example,
alloc,newObject, or mutableCopy), or if you send it a retain message.
You are responsible for relinquishing ownership of objects you own
using releaseor autorelease. Any other time you receive an object, you
must not release it."
Also note the documentation for that method:
"An initialized collection view item with the specified object and the
appropriate view set. The collection view item should not be
autoreleased."
- Bryan
On Sep 7, 2009, at 6:23:30 PM, Colin Deasy wrote:
Does the returned obj from this method:
- (NSCollectionViewItem *)newItemForRepresentedObject:(id)object
require a release?
ThanksColin
_________________________________________________________________
Share your memories online with anyone you want.
http://www.microsoft.com/ireland/windows/windowslive/products/photos-share.aspx?tab=1_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
References: | |
| >(no subject) (From: Colin Deasy <email@hidden>) |