Original Post
I need help to explain the singleton implementation. From what I understand you have a class that has a static variable that is a pointer to the same class type. You them make the constructor private and initialize the class by calling a static function similar to... This seems fine, but how can you guarantee that the m_singleton member will be NULL? Have I got this right? Am I missing something here?
static MyClass* CreateMyClass()
{
if (m_singleton == NULL)
return new MyClass();
else
return m_singleton;
}