static data members
static data members
- Subject: static data members
- From: Ivan Kourtev <email@hidden>
- Date: Fri, 23 Apr 2004 20:13:56 -0400
Hello all,
I suspect that in Objective-C there is no straightforward equivalent to
a C++'s static data member of a class, that is, a data member that is
shared among all instances of a class? Is there any suggested pattern
of how does one go about implementing such functionality? What I need
is a variable that is associated with the class object, accessible from
all class instances but only instantiated once in the class object?
Other than declaring a static variable in the class's *.m file, are
there any other suggested approaches to this situation? Thanks!
--
ivan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.