posted 18 years ago
A Singleton is a class that can only be instantiated once, it's an OOP substitute for global variables. There are two basic idioms for this, eager instantiation and lazy instantiation. I'm writing this code from memory, the bugs are left as an exercise for the reader.
[ April 11, 2005: Message edited by: peter wooster ]