Re: Add same object/key to NSMapTable
Re: Add same object/key to NSMapTable
- Subject: Re: Add same object/key to NSMapTable
- From: Nathan Vander Wilt <email@hidden>
- Date: Wed, 17 Jun 2009 18:48:51 -0700
On Jun 17, 2009, at 6:44 PM, Kyle Sluder wrote:
On Wed, Jun 17, 2009 at 6:33 PM, Nathan Vander
Wilt<email@hidden> wrote:
I could find no documentation to the effect that re-assigning an
object is
not allowed, so can I assume this is indeed unintentional? If so,
I've got
this test case in project form and would be happy to file a bug.
Please do file a bug.
Filed as rdar://problem/6982962. Workaround is to refactor so you're
not doing this, [[o retain] autorelease], or check if the object is
already in the map table.
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,
-natevw
_______________________________________________
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