Re: Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?
Re: Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?
- Subject: Re: Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?
- From: Dave Keck <email@hidden>
- Date: Wed, 28 Oct 2009 23:29:12 -1000
> Why would [NSArray initWithArray:copyItems:] be calling release on any
> object?
When that method copies the objects in the supplied array, the copies
start with a retain count of 1. Then, when each of these copies are
placed into the new array, their retain count becomes 2.
-initWithArray:copyItems then releases each of the copied objects once
so that the array becomes the sole owner of them. (If it didn't do
this, the copied objects would never get released, even when the
resulting array is released.)
_______________________________________________
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