Re: defaultConnection in Snow Leopard
Re: defaultConnection in Snow Leopard
- Subject: Re: defaultConnection in Snow Leopard
- From: Jean-Daniel Dupas <email@hidden>
- Date: Fri, 4 Sep 2009 18:30:41 +0200
Le 4 sept. 2009 à 17:18, Kyle Sluder a écrit :
On Sep 4, 2009, at 7:38 AM, "Gerriet M. Denkmann" <email@hidden
> wrote:
But it fails to mention, what I should use instead.
The release notes say, but I don't have them in front of me andjim
hesitant to go by memory for fear of miquoting.
Quote from the Release notes:
NSConnection method deprecation
The +defaultConnection method in NSConnection has been deprecated.
This provided a singleton connection object per thread. For what
should be obvious reasons, it was never a particularly good idea to
use this method/connection unless you had absolute certainty that no
one else was using it (or going to use it), which was problematic.
Just use [[NSConnection new] autorelease] instead (in conjunction with
NSThread's thread dictionary if you must have one stored per-thread,
though as a design point that may cause you problems in the future, so
it would be best to avoid a per-thread connection)
_______________________________________________
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