
16 Mar
2005
16 Mar
'05
1:57 p.m.
Perhaps. You might be interested to see why I originally wrote it though: what you are doing are very common in multithreaded code. perhaps you consider using this:
virtual void create ( ) { if ( !s_inst && !creating ) { auto_set < bool > reset (creating); creating = true; s_inst = creator_inst.create ( ); } }
the destructor goes basically the same way. But it´s not a really big difference.
-Jason Sérgio