Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Gohliath

Member Since 19 Jul 2013
Offline Last Active Aug 02 2014 10:53 PM

#5168863 This singleton keeps crashing.

Posted by Gohliath on 24 July 2014 - 07:46 AM

may help

http://scottbilas.com/publications/gem-singleton/

a little description of that singleton

 

that version got updated already and replaced 

Singleton( void )
{
assert(!ms_singleton);
int offset = (int)(T*)1 - (int)(Singleton *)(T*)1;
ms_singleton = (T*)((int)this + offset);
}

with 

Singleton( void )
{
assert( !ms_singleton );
ms_singleton = static_cast <T*> (this);
}



PARTNERS