Re: Variable scope/lifetime of class methods (concerns Threads)
Re: Variable scope/lifetime of class methods (concerns Threads)
- Subject: Re: Variable scope/lifetime of class methods (concerns Threads)
- From: Ole Voß <email@hidden>
- Date: Thu, 18 May 2006 16:47:18 +0200
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.
But what happens to the variables within a class method? What is their
scope?
And what do you call them? :-))
Example:
+ (void)doSomething
{
NSString *test_string;
//Is this variable unique for all calls to this class method?
return;
}
Thanks!
Ole.
_______________________________________________
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