• 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: NSUserDefaults objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUserDefaults objects


  • Subject: Re: NSUserDefaults objects
  • From: Ondra Cada <email@hidden>
  • Date: Wed, 22 Mar 2006 21:12:03 +0100

Chris,

On 22.3.2006, at 20:59, Chris Lewis wrote:

What exactly to I get back? Do I get an autoreleased new object or do
I get a reference to an object that already exists?

You don't know and you don't care.

Do I want to retain/release this?

Presumed it has to survive the lifescope of the current autorelease pool, you want to retain/release.


The one exception are objects clearly documented as shared singletons, and even *those* is better (and completely harmless of course) to retain whilst you want to keep them at hand.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSUserDefaults objects
      • From: "Chris Lewis" <email@hidden>
References: 
 >NSUserDefaults objects (From: "Chris Lewis" <email@hidden>)

  • Prev by Date: NSUserDefaults objects
  • Next by Date: Re: NSUserDefaults objects
  • Previous by thread: NSUserDefaults objects
  • Next by thread: Re: NSUserDefaults objects
  • Index(es):
    • Date
    • Thread