PVDatabasePtr PVDatabase::getMaster() { static PVDatabasePtr master; static Mutex mutex; Lock xx(mutex); if(master.get()==NULL) { master = PVDatabasePtr(new PVDatabase()); } return master; }
PVDatabasePtr PVDatabase::getMaster() { static bool firstTime = true; if(firstTime) { firstTime = false; pvDatabaseMaster = PVDatabasePtr(new PVDatabase()); PVArrayPlugin::create(); PVTimestampPlugin::create(); PVDeadbandPlugin::create(); } return pvDatabaseMaster; }