/* These methods are called by CFPlugInInstance when an instance is created or destroyed. If a factory's instance count goes to 0 and the factory has been disabled, the factory is destroyed. */ __private_extern__ void _CFPFactoryAddInstance(_CFPFactoryRef factory) { /* MF:!!! Assert that factory is enabled. */ CFRetain(factory); __CFSpinLock(&factory->_lock); CFPlugInRef plugin = factory->_plugIn; if (plugin) CFRetain(plugin); __CFSpinUnlock(&factory->_lock); if (plugin) { _CFPlugInAddPlugInInstance(plugin); CFRelease(plugin); } }
/* These methods are called by CFPlugInInstance when an instance is created or destroyed. If a factory's instance count goes to 0 and the factory has been disabled, the factory is destroyed. */ __private_extern__ void _CFPFactoryAddInstance(_CFPFactory *factory) { /* MF:!!! Assert that factory is enabled. */ factory->_instanceCount++; if (factory->_plugIn) _CFPlugInAddPlugInInstance(factory->_plugIn); }