这篇教程C++ CFPlugInRemoveInstanceForFactory函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CFPlugInRemoveInstanceForFactory函数的典型用法代码示例。如果您正苦于以下问题:C++ CFPlugInRemoveInstanceForFactory函数的具体用法?C++ CFPlugInRemoveInstanceForFactory怎么用?C++ CFPlugInRemoveInstanceForFactory使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CFPlugInRemoveInstanceForFactory函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: IUnknownRelease/* ============================================================================= Name: IUnknownRelease() Description: This function takes a tick from a plugin instance's reference count. When the reference count goes down to zero the object self-destructs. Input Parameters: obj - The 'this' pointer. Output Parameters: None. Return Value: ULONG - Updated value of the reference count, or zero in case of an error.* ========================================================================== */static ULONG IUnknownRelease(void* obj){ IUnknownInstance* instance = (IUnknownInstance*) obj; ULONG refCount = 0; // We can't do much with errors here since we can only return // updated reference count value. if (instance != NULL) { // Get updated refCount value (should be under mutex): // Make sure refCount is non-zero: if (0 == instance->refCount) { instance = NULL; return(refCount); } refCount = --instance->refCount; // Is it time to self-destruct? if (0 == refCount) { // Unregister 'instance for factory' with CoreFoundation: CFPlugInRemoveInstanceForFactory(instance->factoryID); // Release used factoryID: CFRelease(instance->factoryID); instance->factoryID = NULL; // Deallocate object's memory block: free((void*) instance); instance = NULL; } } return refCount; }
开发者ID:fruitsamples,项目名称:App,代码行数:47,
示例2: _deallocCFPlugTypestatic void _deallocCFPlugType(CFPlugType *myInstance){ CFUUIDRef factoryID = myInstance->_factoryID; free(myInstance); if (factoryID) { CFPlugInRemoveInstanceForFactory(factoryID); CFRelease(factoryID); }}
开发者ID:iSound,项目名称:PlayerPRO,代码行数:9,
示例3: DeallocMetadataImporterPluginType// Utility function that deallocates the instance when// the refCount goes to zero.// In the current implementation importer interfaces are never deallocated// but implement this as this might change in the futurevoid DeallocMetadataImporterPluginType(MetadataImporterPluginType *thisInstance){ CFUUIDRef theFactoryID = thisInstance->factoryID; free(thisInstance); if (theFactoryID) { CFPlugInRemoveInstanceForFactory(theFactoryID); CFRelease(theFactoryID); }}
开发者ID:ksmcardle,项目名称:Alkor,代码行数:14,
示例4: DeallocSampleCMPluginType// -----------------------------------------------------------------------------// DeallocSampleCMPluginType// -----------------------------------------------------------------------------// Utility function that deallocates the instance when// the refCount goes to zero.//static void DeallocSampleCMPluginType( SampleCMPluginType* thisInstance ){ CFUUIDRef theFactoryID = thisInstance->factoryID; free( thisInstance ); if ( theFactoryID ) { CFPlugInRemoveInstanceForFactory( theFactoryID ); CFRelease( theFactoryID ); }}
开发者ID:arnelh,项目名称:Examples,代码行数:16,
示例5: CFPlugInRemoveInstanceForFactoryvoid IOHIDIUnknown::factoryRelease(){ if (1 == factoryRefCount--) { CFUUIDRef factoryId = kIOHIDDeviceFactoryID; CFPlugInRemoveInstanceForFactory(factoryId); CFRelease(factoryId); } else if (factoryRefCount < 0) factoryRefCount = 0;}
开发者ID:MomandDad,项目名称:netbook-installer,代码行数:11,
示例6: DeallocMetadataImporterPluginType// -----------------------------------------------------------------------------// DeallocKoanLogImporterMDImporterPluginType// -----------------------------------------------------------------------------// Utility function that deallocates the instance when// the refCount goes to zero.// In the current implementation importer interfaces are never deallocated// but implement this as this might change in the future//voidDeallocMetadataImporterPluginType (MetadataImporterPluginType *instance){ CFUUIDRef factoryID = instance->factoryID; free (instance); if (factoryID) { CFPlugInRemoveInstanceForFactory ((CFUUIDRef) instance); CFRelease (instance); }}
开发者ID:stesla,项目名称:koan,代码行数:20,
示例7: _deallocMyType // Utility function that deallocates the instance when // the refCount goes to zero. static void _deallocMyType(MyType * obj) {#if PRINTDEBUG printf("JAS: _deallocMyType/n");#endif CFUUIDRef factoryID = obj->_factoryID; free(obj); if (factoryID) { CFPlugInRemoveInstanceForFactory(factoryID); CFRelease(factoryID); } }
开发者ID:briancline,项目名称:jackosx,代码行数:14,
示例8: Dealloc/***************************************************************************** * Dealloc * - * Much like Obj-C dealloc this method is responsible for releasing any object * this plugin is holding. Unlike ObjC, you call directly free() instead of * [super dalloc]. *****************************************************************************/static void Dealloc(BonjourUserEventsPlugin* plugin){ CFUUIDRef factoryID = plugin->_factoryID; if (factoryID) { CFPlugInRemoveInstanceForFactory(factoryID); CFRelease(factoryID); } if (plugin->_tokenToBrowserMap) CFRelease(plugin->_tokenToBrowserMap); if (plugin->_browsers) CFRelease(plugin->_browsers); if (plugin->_onAddEvents) CFRelease(plugin->_onAddEvents); if (plugin->_onRemoveEvents) CFRelease(plugin->_onRemoveEvents); if (plugin->_whileServiceExist) CFRelease(plugin->_whileServiceExist); if (plugin->_timers) { CFIndex i; CFIndex count = CFArrayGetCount(plugin->_timers); CFRunLoopRef crl = CFRunLoopGetCurrent(); for (i = 0; i < count; ++i) { CFRunLoopTimerRef timer = (CFRunLoopTimerRef)CFArrayGetValueAtIndex(plugin->_timers, i); CFRunLoopRemoveTimer(crl, timer, kCFRunLoopCommonModes); } CFRelease(plugin->_timers); } free(plugin);}
开发者ID:benvanik,项目名称:mDNSResponder,代码行数:49,
示例9: CFPlugInRemoveInstanceForFactoryvoidSATSMARTClient::sFactoryRelease ( void ){ if ( sFactoryRefCount-- == 1 ) { CFUUIDRef factoryID = kIOATASMARTLibFactoryID; CFPlugInRemoveInstanceForFactory ( factoryID ); CFRelease ( factoryID ); } else if ( sFactoryRefCount < 0 ) { sFactoryRefCount = 0; }}
开发者ID:eitschpi,项目名称:OS-X-SAT-SMART-Driver,代码行数:20,
示例10: Dealloc/****************************************************************************** Dealloc* -* Much like Obj-C dealloc this method is responsible for releasing any object* this plugin is holding. Unlike ObjC, you call directly free() instead of* [super dalloc].*****************************************************************************/static void Dealloc(BonjourUserEventsPlugin* plugin){ CFUUIDRef factoryID = plugin->_factoryID; if (factoryID) { CFPlugInRemoveInstanceForFactory(factoryID); CFRelease(factoryID); } if (plugin->_tokenToBrowserMap) CFRelease(plugin->_tokenToBrowserMap); if (plugin->_browsers) CFRelease(plugin->_browsers); if (plugin->_onAddEvents) CFRelease(plugin->_onAddEvents); if (plugin->_onRemoveEvents) CFRelease(plugin->_onRemoveEvents); free(plugin);}
开发者ID:thenewwazoo,项目名称:Community-mdnsResponder,代码行数:31,
示例11: CFPlugInRemoveInstanceForFactoryHP_HardwarePlugIn::~HP_HardwarePlugIn(){ CFPlugInRemoveInstanceForFactory(mFactoryUUID.GetCFObject());}
开发者ID:abscura,项目名称:audiounitjs,代码行数:4,
示例12: CFPlugInRemoveInstanceForFactory//------------------------------------------------------------------------------// IOHIDEventSystemStatistics::IOHIDEventSystemStatistics//------------------------------------------------------------------------------IOHIDEventSystemStatistics::~IOHIDEventSystemStatistics(){ CFPlugInRemoveInstanceForFactory( _factoryID ); CFRelease( _factoryID );}
开发者ID:wzw19890321,项目名称:IOHIDFamily,代码行数:8,
注:本文中的CFPlugInRemoveInstanceForFactory函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CFREE函数代码示例 C++ CFPlugInAddInstanceForFactory函数代码示例 |