Singleton Pattern with struct

ParticlePeter ParticlePeter at gmx.de
Thu Jan 24 07:50:33 PST 2013


Got it, thanks, I changed the instance method to:
[code]
	static Singleton * instance()  {
		if ( s is null )
			s = new Singleton( 0 ) ;
		return s ;
	}
[\code]

and everything works as expected.

Cheers, PP !



More information about the Digitalmars-d-learn mailing list