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

This email sent to [email protected]

_______________________________________________

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

This email sent to [email protected]

Reply via email to