Singletons?
Singletons?
- Subject: Singletons?
- From: The Amazing Llama <email@hidden>
- Date: Fri, 21 Jun 2002 00:43:45 -0700
Okay, so ObjC has no static variables.
How do you do a Singleton? What I'm seeing in code on the 'net is to make a global static variable in the .m, but this seems dangerous (someone could change it out from under you, and you can't do anything to stop them) and not at all object oriented (it's just floating out there, polluting the global namespace).
There has to be a better way... right?
-The Amazing Llama <tallama at mac dot com>
"Life is like an exploded clown. It's really funny until you figure out what just happened."
_______________________________________________
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.