void DropRef() { sys::SmartScopedLock<true> Lock(*ALMutex); if (!AttributesLists.isConstructed()) return; sys::cas_flag new_val = --RefCount; if (new_val == 0) delete this; }
std::string &PluginLoader::getPlugin(unsigned num) { sys::SmartScopedLock<true> Lock(*PluginsLock); assert(Plugins.isConstructed() && num < Plugins->size() && "Asking for an out of bounds plugin"); return (*Plugins)[num]; }
unsigned PluginLoader::getNumPlugins() { sys::SmartScopedLock<true> Lock(*PluginsLock); return Plugins.isConstructed() ? Plugins->size() : 0; }
/// Check if GlobalExtensions is constructed and not empty. /// Since GlobalExtensions is a managed static, calling 'empty()' will trigger /// the construction of the object. static bool GlobalExtensionsNotEmpty() { return GlobalExtensions.isConstructed() && !GlobalExtensions->empty(); }