Instance variable

From GNUstepWiki
Revision as of 09:45, 21 June 2006 by Cbv (talk | contribs) (Added to category Objective-C)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Each instance of a class may have a local copy of one or more variables which are known as instance variables, and which may contain unique properties or values associated with that instance. These variables are not shared between instances of a class.

Instance variables are declared in the class's interface and become part of any objects which are members of, or inherit from, the class.

Instance variables are also referred to as ivars.

Compare with the concept of a class variable.