swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is "static" meaningful in Objective-C methods?


From: Paul E Johnson
Subject: Is "static" meaningful in Objective-C methods?
Date: Wed, 01 Nov 2000 16:23:35 -0600

<Naive C question alert>
I don't have any C/ObjC buddies to ask, except for you folks.

Is there any danger in using "static" local variables in methods in
Objective-C?

In the C book it says I can declare a static local variable in a
function and it will remember its value for the next time the function
is called.  

Using this in Swarm would let me get rid of a bunch of IVARS that hold
values of seldom-used methods, so I could clean up some code. But I've
not seen this in Swarm examples, and wonder if there is a danger of
class instances corrupting or accidentally using each other's values for
static variables.  
</>
-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]