Re: Multiple instances of [NSUserDefaults standardUserDefaults]
Re: Multiple instances of [NSUserDefaults standardUserDefaults]
- Subject: Re: Multiple instances of [NSUserDefaults standardUserDefaults]
- From: Chris Idou <email@hidden>
- Date: Sat, 23 Oct 2010 04:13:47 -0700 (PDT)
Well, I've got some code, which I presume used to work, which relies on
observing a value in the user defaults. The observer isn't getting triggered, so
I am guessing it is because they are separate instances. Both should be on the
main thread.
----- Original Message ----
From: Dave Keck <email@hidden>
To: Chris Idou <email@hidden>
Cc: email@hidden
Sent: Sat, 23 October, 2010 10:05:01 PM
Subject: Re: Multiple instances of [NSUserDefaults standardUserDefaults]
> Has anyone got any thoughts?
I wouldn't be surprised if there's a separate NSUserDefaults instance
for each thread. Regardless though, it's an implementation detail that
shouldn't be relied on unless the docs guarantee certain behavior.
Could you explain why you need to rely on NSUserDefaults returning the
same instance on each invocation of -standardUserDefaults?
_______________________________________________
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