• 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... It is me
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apples's code examples... It is me


  • Subject: Re: Apples's code examples... It is me
  • From: "Yanko Ivanov" <email@hidden>
  • Date: Wed, 6 Feb 2008 18:09:18 +0100

On Feb 6, 2008 3:55 PM, Jean-Daniel Dupas <email@hidden> wrote:

> In the Apple sample code, this is the same pattern, but static is not
> exactly the same in C than in Java. a static variable is stored in the heap
> and does not each from one call to another.
> a Static variable initialization is perform only one time, so the "static id
> myObject = nil;" is not perform on each call by only once at program
> startup.
>
> (From Wikipedia: In the C programming language, static is used with global
> variables and functions to set their scope to the containing file. In local
> variables, static is used to store the variable on the heap instead of in
> the transient call stack.)

Yes, that was it...

Thank you!

Regards,
Yanko
_______________________________________________

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: 
 >Re: Apples's code examples... It is me (From: "Yanko Ivanov" <email@hidden>)
 >Re: Apples's code examples... It is me (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • Next by Date: Re: Searching for "whole word" in NSString
  • Previous by thread: Re: Apples's code examples... It is me
  • Next by thread: Re: Transferring data between Python and Cocoa (maybe a newbie question)
  • Index(es):
    • Date
    • Thread