// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
#include <cstddef>

using namespace std;

#include "Lock.h"

#include "SynchronizedSingleton.h"

SynchronizedSingleton* SynchronizedSingleton::instance = NULL;

SynchronizedSingleton* SynchronizedSingleton::Instance()
{
    Lock mylock;
    if(instance == NULL)
    {
        instance = new SynchronizedSingleton();
    }
    return instance;
}
