Inglese
Hi,
I have a function that's called a lot from within some muiltthreaded code that looks roughly like this (hopefully not too mangled by the web form to read!):
Thing* get_thing()
{
lock();
if (g_references == 0)
g_thing = new Thing();
g_references++;
unlock();
return g_thing;
}