Re: Add same object/key to NSMapTable
Re: Add same object/key to NSMapTable
- Subject: Re: Add same object/key to NSMapTable
- From: Bill Bumgarner <email@hidden>
- Date: Wed, 17 Jun 2009 20:51:48 -0500
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.
If you need the object, you should hold a retain.
b.bum
_______________________________________________
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