• 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: Variable scope/lifetime of class methods (concerns Threads)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable scope/lifetime of class methods (concerns Threads)


  • Subject: Re: Variable scope/lifetime of class methods (concerns Threads)
  • From: j o a r <email@hidden>
  • Date: Thu, 18 May 2006 16:38:43 +0200


On 18 maj 2006, at 16.01, Ole Voß wrote:

What I meant is that the variables used within a method are unique to the object it is used within.

Instance variables are created with the object, not shared between objects or available in a global scope, that is true.


What I meant here are the variables used within the class method. These are unique as opposed to the variables of a method of an object that is instantiated?

There are no special type of variables for class methods (ie. while there are instance variables, there are no class variables). You might think of "static" variables (often used as a substitute for proper class variables), or other variables with a global scope.


Additional details for Cocoa programmers:

<http://developer.apple.com/documentation/Cocoa/Conceptual/ Multithreading/index.html>

For more basic / fundamental discussions on the topic of thread safety (ie. not particular to Cocoa), I suggest you pick up some good book, or use Google.

j o a r


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Variable scope/lifetime of class methods (concerns Threads)
      • From: Ole Voß <email@hidden>
References: 
 >Re: How to get buttonType from NSButton (From: RameshPVK <email@hidden>)
 >Re: How to get buttonType from NSButton (From: mmalcolm crawford <email@hidden>)
 >Variable scope/lifetime of class methods (concerns Threads) (From: Ole Voß <email@hidden>)
 >Re: Variable scope/lifetime of class methods (concerns Threads) (From: Ondra Cada <email@hidden>)
 >Re: Variable scope/lifetime of class methods (concerns Threads) (From: Ole Voß <email@hidden>)

  • Prev by Date: Re: How subclass NSTreeController's -(void)insertChild:? [fixed]
  • Next by Date: Re: URI de/encoding
  • Previous by thread: Re: Variable scope/lifetime of class methods (concerns Threads)
  • Next by thread: Re: Variable scope/lifetime of class methods (concerns Threads)
  • Index(es):
    • Date
    • Thread