您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DestroyInstance函数代码示例

51自学网 2021-06-01 20:27:11
  C++
这篇教程C++ DestroyInstance函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DestroyInstance函数的典型用法代码示例。如果您正苦于以下问题:C++ DestroyInstance函数的具体用法?C++ DestroyInstance怎么用?C++ DestroyInstance使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DestroyInstance函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: set

// staticXPCNativeSet*XPCNativeSet::GetNewOrUsed(XPCCallContext& ccx, const nsIID* iid){    AutoMarkingNativeSetPtr set(ccx);    AutoMarkingNativeInterfacePtr iface(ccx);    iface = XPCNativeInterface::GetNewOrUsed(ccx, iid);    if(!iface)        return nsnull;    XPCNativeSetKey key(nsnull, iface, 0);    XPCJSRuntime* rt = ccx.GetRuntime();    NativeSetMap* map = rt->GetNativeSetMap();    if(!map)        return nsnull;    {   // scoped lock        XPCAutoLock lock(rt->GetMapLock());        set = map->Find(&key);    }    if(set)        return set;    // hacky way to get a XPCNativeInterface** using the AutoPtr    XPCNativeInterface* temp[] = {iface};     set = NewInstance(ccx, temp, 1);    if(!set)        return nsnull;    {   // scoped lock        XPCAutoLock lock(rt->GetMapLock());        XPCNativeSet* set2 = map->Add(&key, set);        if(!set2)        {            NS_ERROR("failed to add our set!");            DestroyInstance(set);            set = nsnull;        }        else if(set2 != set)        {            DestroyInstance(set);            set = set2;        }    }    return set;}
开发者ID:jdahlin,项目名称:jslint,代码行数:50,


示例2: EmptyTrash

void EmptyTrash(void){  register unsigned c;  register unsigned long i,len;  register struct DumpRec *p,*next;  register struct gl_list_t *l;  if (g_dump_inst_count==0) return;  for(c=0;c<DUMPHASHSIZE;c++) {    p = g_dump_ht[c];    g_dump_ht[c]=NULL;    while (p!=NULL) {      AssertAllocatedMemory(p,sizeof(struct DumpRec));      next = p->next;      if ((l=p->instances)!=NULL) {	len = gl_length(l);	for(i=1;i<=len;i++)	  DestroyInstance((struct Instance *)gl_fetch(l,i),NULL);	gl_destroy(l);      }      ascfree((char *)p);      p = next;    }  }  g_dump_type_count = 0;  g_dump_inst_count = 0;}
开发者ID:georgyberdyshev,项目名称:ascend,代码行数:26,


示例3: while

void MapInstanced::Update(const uint32 t){    // take care of loaded GridMaps (when unused, unload it!)    Map::Update(t);    // update the instanced maps    InstancedMaps::iterator i = m_InstancedMaps.begin();    while (i != m_InstancedMaps.end())    {        if (i->second->CanUnload(t))        {            if (!DestroyInstance(i))                             // iterator incremented            {                //m_unloadTimer            }        }        else        {            // update only here, because it may schedule some bad things before delete            if (sMapMgr->GetMapUpdater()->activated())                sMapMgr->GetMapUpdater()->schedule_update(*i->second, t);            else                i->second->Update(t);            ++i;        }    }}
开发者ID:Blackn7g,项目名称:Voodoo,代码行数:28,


示例4: iface

// staticXPCNativeInterface*XPCNativeInterface::GetNewOrUsed(XPCCallContext& ccx, const nsIID* iid){    AutoMarkingNativeInterfacePtr iface(ccx);    XPCJSRuntime* rt = ccx.GetRuntime();    IID2NativeInterfaceMap* map = rt->GetIID2NativeInterfaceMap();    if(!map)        return nsnull;    {   // scoped lock        XPCAutoLock lock(rt->GetMapLock());        iface = map->Find(*iid);    }    if(iface)        return iface;    nsCOMPtr<nsIInterfaceInfo> info;    ccx.GetXPConnect()->GetInfoForIID(iid, getter_AddRefs(info));    if(!info)        return nsnull;    iface = NewInstance(ccx, info);    if(!iface)        return nsnull;    {   // scoped lock        XPCAutoLock lock(rt->GetMapLock());        XPCNativeInterface* iface2 = map->Add(iface);        if(!iface2)        {            NS_ERROR("failed to add our interface!");            DestroyInstance(ccx, rt, iface);            iface = nsnull;        }        else if(iface2 != iface)        {            DestroyInstance(ccx, rt, iface);            iface = iface2;        }    }    return iface;}
开发者ID:jdahlin,项目名称:jslint,代码行数:46,


示例5: DestroyInstance

void CEventManager::Terminate(){	m_bIsInit = false;	//if (m_Thread.joinable())	//	m_Thread.join();	DestroyInstance();};
开发者ID:Void13,项目名称:AnubisEngine,代码行数:9,


示例6: GetInstance

/*========Engine::RunScene	Initializes the engine, and runs the scene passed in.========*/int Engine::RunScene( Scene* scene ) {	Engine* inst = GetInstance();	inst->SetScene(scene);		int retValue = inst->MainLoop();		GetInstance()->Shutdown();	DestroyInstance();	 	return retValue;}
开发者ID:Mertank,项目名称:ToneArm,代码行数:18,


示例7: GetInstance

//====================================//	Creates the DInputDeviceDB object//====================================FUSIONPLUGIN void GetInstance(Fusion &f){	fusion = &f;	if(fusion->Input == NULL){		fusion->Input = new DI8InputDeviceDB();		if(fusion->Input->Initialise() == false){			DestroyInstance();		}	}}
开发者ID:christhomas,项目名称:fusionengine,代码行数:15,


示例8: GetInstance

//====================================//	Creates the Network object//====================================FUSIONPLUGIN void GetInstance(Fusion &f){	fusion = &f;	if(fusion->Network == NULL){		fusion->Network = new WSANetworkCore();		if(fusion->Network->Initialise() == false){						DestroyInstance();		}	}}
开发者ID:christhomas,项目名称:fusionengine,代码行数:15,


示例9: DllMain

BOOL APIENTRY DllMain( HANDLE hModule,                        DWORD  ul_reason_for_call,                        LPVOID lpReserved					 ){    switch (ul_reason_for_call) {		case DLL_PROCESS_ATTACH:			CreateInstance();			break;		case DLL_THREAD_ATTACH:			break;		case DLL_THREAD_DETACH:			break;		case DLL_PROCESS_DETACH:			DestroyInstance();			break;    }    return TRUE;}
开发者ID:nizvoo,项目名称:ziputils,代码行数:19,


示例10: TendTrash

void TendTrash(void){  register unsigned c;  register unsigned long i;  register struct DumpRec *p;  register struct gl_list_t *l;  if (g_dump_inst_count <= MESSYTHRESH) return;  for(c=0;c<DUMPHASHSIZE;c++) {    p = g_dump_ht[c];    while(p!=NULL) {      if ((l=p->instances)!=NULL) {	for (i=gl_length(l);i>MESSYTHRESH;i--) {	  DestroyInstance((struct Instance *)gl_fetch(l,i),NULL);	  g_dump_inst_count--;	  gl_delete(l,i,0);	}      }      p = p->next;    }  }}
开发者ID:georgyberdyshev,项目名称:ascend,代码行数:21,


示例11: while

void MapInstanced::Update(const uint32& t){    // take care of loaded GridMaps (when unused, unload it!)    Map::Update(t);    // update the instanced maps    InstancedMaps::iterator i = m_InstancedMaps.begin();    while (i != m_InstancedMaps.end())    {        if (i->second->CanUnload(t))        {            DestroyInstance(i);                             // iterator incremented        }        else        {            // update only here, because it may schedule some bad things before delete            i->second->Update(t);            ++i;        }    }}
开发者ID:Amara1231,项目名称:blizzlikecore,代码行数:22,


示例12: TrashType

void TrashType(symchar *str){  register unsigned long c,len,bucket;  register struct DumpRec *p,*prev;  register struct gl_list_t *l;  register int cmp;  assert(AscFindSymbol(str)!=NULL);  if (*(SCP(str)) == '/0') return;  bucket = DUMPHASHINDEX(SCP(str));  if ((p = g_dump_ht[bucket])==NULL) return;  cmp = CmpSymchar(p->type,str);  if (cmp == 0)    g_dump_ht[bucket] = p->next;  else    if (cmp > 0) return;    else {      prev = p;      if ((p = p->next)==NULL) return;      while((cmp=CmpSymchar(p->type,str))<0) {	prev = p;	if ((p=p->next)==NULL) return;      }      if (cmp!=0) return;      /* remove from linked list */      prev->next = p->next;    }  if ((l=p->instances)!=NULL) {    len = gl_length(l);    for(c=1;c<=len;c++)      DestroyInstance((struct Instance *)gl_fetch(l,c),NULL);    gl_destroy(l);    g_dump_inst_count -= len;  }  g_dump_type_count--;  ascfree((char *)p);}
开发者ID:georgyberdyshev,项目名称:ascend,代码行数:36,


示例13: DestroyInstance

void MapInstanced::DestroyInstance(uint32 InstanceId){    InstancedMaps::iterator itr = m_InstancedMaps.find(InstanceId);    if(itr != m_InstancedMaps.end())        DestroyInstance(itr);}
开发者ID:Choices,项目名称:mangos,代码行数:6,


示例14: DestroyInstance

CImageDecoder::~CImageDecoder(){  DestroyInstance();}
开发者ID:68foxboris,项目名称:xbmc,代码行数:4,


示例15: DdeUninitialize

/***************************************************************************/* DdeUninitialize (DDEML API)** Description:* Shuts down a DDEML instance and frees all associated resources.** History:* 11-12-91 sanfords Created./***************************************************************************/BOOL DdeUninitialize(DWORD idInst){    PCL_INSTANCE_INFO pcii, pciiPrev;    BOOL fRet = FALSE;    CheckDDECritOut;    EnterDDECrit;    pcii = ValidateInstance((HANDLE)LongToHandle( idInst ));    if (pcii == NULL) {        BestSetLastDDEMLError(DMLERR_INVALIDPARAMETER);        goto Exit;    }    /*     * If this thread is in the middle of a synchronous transaction or     * a callback, we need to back out of those first.     */    if ((pcii->flags & IIF_IN_SYNC_XACT) || pcii->cInDDEMLCallback) {        pcii->afCmd |= APPCMD_UNINIT_ASAP;        fRet = TRUE;        goto Exit;    }    ApplyFunctionToObjects(HTYPE_CONVERSATION_LIST, InstFromHandle(pcii->hInstClient),            (PFNHANDLEAPPLY)DdeDisconnectList);    ApplyFunctionToObjects(HTYPE_CLIENT_CONVERSATION, InstFromHandle(pcii->hInstClient),            (PFNHANDLEAPPLY)DdeDisconnect);    ApplyFunctionToObjects(HTYPE_SERVER_CONVERSATION, InstFromHandle(pcii->hInstClient),            (PFNHANDLEAPPLY)DdeDisconnect);    ApplyFunctionToObjects(HTYPE_ZOMBIE_CONVERSATION, InstFromHandle(pcii->hInstClient),            (PFNHANDLEAPPLY)WaitForZombieTerminate);    ApplyFunctionToObjects(HTYPE_DATA_HANDLE, InstFromHandle(pcii->hInstClient),            (PFNHANDLEAPPLY)ApplyFreeDataHandle);    LeaveDDECrit;    NtUserCallOneParam((ULONG_PTR)pcii->hInstServer, SFI__CSDDEUNINITIALIZE);    NtUserDestroyWindow(pcii->hwndMother);    EnterDDECrit;    DDEMLFree(pcii->plaNameService);    DestroyInstance(pcii->hInstClient);    // unlink pcii from pciiList    if (pciiList == pcii) {        pciiList = pciiList->next;    } else {        for (pciiPrev = pciiList; pciiPrev != NULL && pciiPrev->next != pcii;                pciiPrev = pciiPrev->next) {            ;        }        if (pciiPrev != NULL) {            pciiPrev->next = pcii->next;        }    }    DDEMLFree(pcii);    fRet = TRUE;Exit:    LeaveDDECrit;    return (fRet);}
开发者ID:conioh,项目名称:os-design,代码行数:73,


示例16: _shutdown

Geometry::~Geometry() {	_shutdown();	DestroyInstance();}
开发者ID:WofloW,项目名称:ZooTrip,代码行数:4,


示例17: DestroyInstance

CVisualization::~CVisualization(){  /* Destroy the class "kodi::addon::CInstanceVisualization" on add-on side */  DestroyInstance();}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:5,


示例18: DestroyInstance

void RPG_GuiManager::OnDeactivate(){  DestroyInstance();}
开发者ID:cDoru,项目名称:projectanarchy,代码行数:4,


示例19: DestroyInstance

World::~World() {	DestroyInstance();}
开发者ID:WofloW,项目名称:ZooTrip,代码行数:3,


示例20: DestroyInstance

CVFSEntry::~CVFSEntry(){  DestroyInstance();}
开发者ID:68foxboris,项目名称:xbmc,代码行数:4,


示例21: instance

/*- return the right instance for the object, based on its InstanceId- create the instance if it's not created already- the player is not actually added to the instance (only in InstanceMap::Add)*/Map* MapInstanced::CreateInstanceForPlayer(const uint32 mapId, Player* player){     if (GetId() != mapId || !player)        return NULL;    Map* map = NULL;    if (IsBattlegroundOrArena())    {        // instantiate or find existing bg map for player        // the instance id is set in battlegroundid        uint32 newInstanceId = player->GetBattlegroundId();        if (!newInstanceId)            return NULL;        map = sMapMgr->FindMap(mapId, newInstanceId);        if (!map)        {            Battleground* bg = player->GetBattleground(true);            if (bg && bg->GetStatus() < STATUS_WAIT_LEAVE)                map = CreateBattleground(newInstanceId, bg);            else            {                player->TeleportToEntryPoint();                return NULL;            }        }    }    else    {        Difficulty realdiff = player->GetDifficulty(IsRaid());        uint32 destInstId = sInstanceSaveMgr->PlayerGetDestinationInstanceId(player, GetId(), realdiff);        if (destInstId)        {            InstanceSave* pSave = sInstanceSaveMgr->GetInstanceSave(destInstId);            ASSERT(pSave); // pussywizard: must exist            map = FindInstanceMap(destInstId);            if (!map)                map = CreateInstance(destInstId, pSave, realdiff);            else if ((mapId == 631 || mapId == 724) && !map->HavePlayers() && map->GetDifficulty() != realdiff)            {                if (player->isBeingLoaded()) // pussywizard: crashfix (assert(passengers.empty) fail in ~transport), could be added to a transport during loading from db                    return NULL;                if (!map->AllTransportsEmpty())                    map->AllTransportsRemovePassengers(); // pussywizard: gameobjects / summons (assert(passengers.empty) fail in ~transport)                for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); ++i)                    if (i->first == destInstId)                    {                        DestroyInstance(i);                        map = CreateInstance(destInstId, pSave, realdiff);                        break;                    }            }        }        else        {            uint32 newInstanceId = sMapMgr->GenerateInstanceId();            ASSERT(!FindInstanceMap(newInstanceId)); // pussywizard: instance with new id can't exist            Difficulty diff = player->GetGroup() ? player->GetGroup()->GetDifficulty(IsRaid()) : player->GetDifficulty(IsRaid());            map = CreateInstance(newInstanceId, NULL, diff);        }    }    return map;}
开发者ID:AzerothShard-Dev,项目名称:azerothcore,代码行数:74,


示例22: set

// staticXPCNativeSet*XPCNativeSet::GetNewOrUsed(XPCCallContext& ccx, nsIClassInfo* classInfo){    AutoMarkingNativeSetPtr set(ccx);    XPCJSRuntime* rt = ccx.GetRuntime();    ClassInfo2NativeSetMap* map = rt->GetClassInfo2NativeSetMap();    if (!map)        return nsnull;    {   // scoped lock        XPCAutoLock lock(rt->GetMapLock());        set = map->Find(classInfo);    }    if (set)        return set;    nsIID** iidArray = nsnull;    AutoMarkingNativeInterfacePtrArrayPtr interfaceArray(ccx);    PRUint32 iidCount = 0;    if (NS_FAILED(classInfo->GetInterfaces(&iidCount, &iidArray))) {        // Note: I'm making it OK for this call to fail so that one can add        // nsIClassInfo to classes implemented in script without requiring this        // method to be implemented.        // Make sure these are set correctly...        iidArray = nsnull;        iidCount = 0;    }    NS_ASSERTION((iidCount && iidArray) || !(iidCount || iidArray), "GetInterfaces returned bad array");    // !!! from here on we only exit through the 'out' label !!!    if (iidCount) {        AutoMarkingNativeInterfacePtrArrayPtr            arr(ccx, new XPCNativeInterface*[iidCount], iidCount, true);        if (!arr)            goto out;        interfaceArray = arr;        XPCNativeInterface** currentInterface = interfaceArray;        nsIID**              currentIID = iidArray;        PRUint16             interfaceCount = 0;        for (PRUint32 i = 0; i < iidCount; i++) {            nsIID* iid = *(currentIID++);            if (!iid) {                NS_ERROR("Null found in classinfo interface list");                continue;            }            XPCNativeInterface* iface =                XPCNativeInterface::GetNewOrUsed(ccx, iid);            if (!iface) {                // XXX warn here                continue;            }            *(currentInterface++) = iface;            interfaceCount++;        }        if (interfaceCount) {            set = NewInstance(ccx, interfaceArray, interfaceCount);            if (set) {                NativeSetMap* map2 = rt->GetNativeSetMap();                if (!map2)                    goto out;                XPCNativeSetKey key(set, nsnull, 0);                {   // scoped lock                    XPCAutoLock lock(rt->GetMapLock());                    XPCNativeSet* set2 = map2->Add(&key, set);                    if (!set2) {                        NS_ERROR("failed to add our set!");                        DestroyInstance(set);                        set = nsnull;                        goto out;                    }                    if (set2 != set) {                        DestroyInstance(set);                        set = set2;                    }                }            }        } else            set = GetNewOrUsed(ccx, &NS_GET_IID(nsISupports));    } else        set = GetNewOrUsed(ccx, &NS_GET_IID(nsISupports));    if (set)    {   // scoped lock        XPCAutoLock lock(rt->GetMapLock());//.........这里部分代码省略.........
开发者ID:lofter2011,项目名称:Icefox,代码行数:101,


示例23: DestroyInstance

AIManager::~AIManager() {	DestroyInstance();}
开发者ID:WofloW,项目名称:ZooTrip,代码行数:3,


示例24: DestroyInstance

CScreenSaver::~CScreenSaver(){  /* Destroy the class "kodi::addon::CInstanceScreensaver" on add-on side */  DestroyInstance();}
开发者ID:FLyrfors,项目名称:xbmc,代码行数:5,


示例25: GetObject

bool GameFactory::DestroyInstance(NetworkID id){	FactoryObject reference = GetObject(id);	DestroyInstance(reference);	return true;}
开发者ID:DevCortez,项目名称:vaultmp,代码行数:6,



注:本文中的DestroyInstance函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ DestroyMagickWand函数代码示例
C++ DestroyImageList函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。