On 2010-07-22 at 17:27:23 [+0200], Adrien Destugues <pulkomandy@xxxxxxxxxxxxxxxxx> wrote: > > That's not thread safe. Either locking or atomic initialization > > (__init_once()) are needed. > > Can _init_once() handle the fact that the objects may be deleted and > recreated (in the assignment operator) ? You just have to reinitialize the guard variable. Concurrent access while doing that is not safe, though. If that shall be supported, a lock is the only option. CU, Ingo