• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Add same object/key to NSMapTable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Add same object/key to NSMapTable
      • From: Kyle Sluder <email@hidden>
    • Re: Add same object/key to NSMapTable
      • From: Bill Bumgarner <email@hidden>
References: 
 >Add same object/key to NSMapTable (From: Nathan Vander Wilt <email@hidden>)
 >Re: Add same object/key to NSMapTable (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Add same object/key to NSMapTable
  • Next by Date: Re: Add same object/key to NSMapTable
  • Previous by thread: Re: Add same object/key to NSMapTable
  • Next by thread: Re: Add same object/key to NSMapTable
  • Index(es):
    • Date
    • Thread