Re: Add same object/key to NSMapTable
Re: Add same object/key to NSMapTable
- Subject: Re: Add same object/key to NSMapTable
- From: Michael Ash <email@hidden>
- Date: Wed, 17 Jun 2009 23:29:12 -0400
On Wed, Jun 17, 2009 at 9:51 PM, Bill Bumgarner<email@hidden> wrote:
> On Jun 17, 2009, at 8:48 PM, Nathan Vander Wilt wrote:
>>>
>>> In the meantime, the explicit case you present is always going to be
>>> fraught with peril, because after you release o, you have relinquished
>>> all rights to it. It's now a weak reference.
>
>> Isn't it acceptable practice to let a container object I hold to maintain
>> its objects on my behalf?
>
> (Thanks for the bug -- it might end up as "behaves correctly", but the
> documentation should be refined)
>
> You can't assume that the container didn't make a copy or do something else.
I think you can, in this case, because NSMapTable isn't documented as
requiring a copyable object.
Mike
_______________________________________________
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