• 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: 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


  • Follow-Ups:
    • Re: Add same object/key to NSMapTable
      • From: Michael Ash <email@hidden>
    • Re: Add same object/key to NSMapTable
      • From: Jim Correia <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>)
 >Re: Add same object/key to NSMapTable (From: Nathan Vander Wilt <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