Original Post
Say you have an object that is shared by many, many different objects in your program. Is it generally better practice to declare the object as a global and call it directly or to use a static member variable that returns a singleton?
// This
MyClass globalMyClass;
// or this
class MyClass {
public:
static MyClass* MyClass::Instance() { return mSingleton; }
// I know I'm not checking if it's set, its just an example :)
private:
MyClass *mSingleton;
};