• 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: Apples's code examples... Poor coded or it is just me?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apples's code examples... Poor coded or it is just me?


  • Subject: Re: Apples's code examples... Poor coded or it is just me?
  • From: "David Orriss Jr" <email@hidden>
  • Date: Wed, 6 Feb 2008 08:47:10 -0800

On Feb 6, 2008 3:24 AM, Kyle Sluder <email@hidden> wrote:
> On Feb 6, 2008 6:05 AM, Yanko Ivanov <email@hidden> wrote:
> > Please take a look at the code at http://pastie.textmate.org/148159
> >
> > It is clear that the code's intention is to instantiate the managed
> > object context only once... however it seems to me that a new instance
> > will be created every time the method is being called.
>
> Did you miss the "static" keyword before the variable declaration?
>

That was what I noticed too.  In that case it would seem Apple's
example is a singleton where Yanko appears to be implementing more of
a factory-style approach.


--
David Orriss Jr.

My blog: http://www.codethought.com/blog
_______________________________________________

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

References: 
 >Apples's code examples... Poor coded or it is just me? (From: Yanko Ivanov <email@hidden>)
 >Re: Apples's code examples... Poor coded or it is just me? (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: Bug in CF/NSString's no-copy constructors (was Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful)
  • Next by Date: Popping open a status item menu
  • Previous by thread: Re: Apples's code examples... Poor coded or it is just me?
  • Next by thread: Safari bookmarks...
  • Index(es):
    • Date
    • Thread