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

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

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

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

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

示例1: ASSERT

void P2PProxySession::OnMessage(talk_base::Message *msg){  ASSERT(signal_thread_->IsCurrent());  switch(msg->message_id){  case DESTORY_SELFT:    {      if(p2p_connection_implementator_ != NULL){         std::cout << "delete p2p connection implementation" << std::endl;        delete p2p_connection_implementator_;        p2p_connection_implementator_ = NULL;      }      if(p2p_proxy_sockets_.size() == 0){        std::cout  << "delete proxy p2p session" << std::endl;        p2p_connection_management_->DeleteP2PProxySession(this);      }      break;    }  case CLOSE_ALL_PROXY_SOCKET:    {      break;    }  case SEND_BUFFER_DATA:    {      LOG_P2P(P2P_PROXY_SOCKET_LOGIC) << "Send command data";      if(state_ == P2P_CLOSE)        return ;      //send this string to remote peer      size_t written;      ///////////////////////////////////////////////////////////////////      //when p2p connection implementation is NULL, is can't send message      //it is normal but it very important       ///////////////////////////////////////////////////////////////////      if(p2p_connection_implementator_ == NULL || command_data_buffers_.empty()){        return ;      }      P2PCommandData *p2p_command_data = command_data_buffers_.front();      p2p_connection_implementator_->Send(0,TCP_SOCKET,         p2p_command_data->data_,p2p_command_data->len_,&written);      if(written == P2PRTSPCOMMAND_LENGTH){        command_data_buffers_.pop();        delete p2p_command_data;      }      break;    }  case RELEASE_ALL:    {      if(p2p_proxy_sockets_.size() == 0)        Destory();      break;    }  case DELAYED_CLOSE:    {      if(state_ == P2P_CLOSING){        state_ = P2P_CLOSE;        Destory();      }    }  }}
开发者ID:coderlirui,项目名称:LibIceSolution,代码行数:59,


示例2: Destory

void RedBlackTree::Destory(TreeNode *T){    if (T != m_pSentinel && T != NULL )    {        Destory(T->left) ;        Destory(T->right) ;    }}
开发者ID:EvilKnight1986,项目名称:StudentManage,代码行数:8,


示例3: Destory

	void Destory(HuffmanNode_P<T>*& root)	{		if (root)		{			Destory(root->_left);			Destory(root->_right);						delete root;			root = NULL;		}	}
开发者ID:sanguonaigao,项目名称:DataStruct,代码行数:11,


示例4: Destory

Status Destory(TREE_TYPE* tree) {	if (*tree == NULL)		return OK;	Destory(&((*tree) -> first_child));	Destory(&((*tree) -> next_sibling));	free(*tree);	*tree = NULL;	return OK;}
开发者ID:yuandong1222,项目名称:DataStructureInC,代码行数:12,


示例5: Flush

bool CGameSocket::SendMsg(BYTE* pBuf, int nSize){	if (pBuf == NULL || nSize <= 0)		return false;	if (m_sockClient == INVALID_SOCKET)		return false;	// 检查消息包长度	int nPackSize = 0;	nPackSize = nSize;	// 检测BUFFER溢出	if (m_nOutBufLen + nSize > OUTBUFSIZE)	{		// 立即发送OUTBUF中的数据,以清空OUTBUF		Flush();		if (m_nOutBufLen + nSize > OUTBUFSIZE)		{			// 出错了			Destory();			return false;		}	}	// 数据添加到BUF尾	memcpy(m_outBuf + m_nOutBufLen, pBuf, nSize);	m_nOutBufLen += nSize;	Flush();	return true;}
开发者ID:DLsoftware,项目名称:socketNet,代码行数:29,


示例6: Destory

BOOL CThreadSafeCycleBufferEx::Create(LPVOID pBuff,UINT Size,UINT SmoothSize){	Destory();	CAutoLockEx FrontLock;	if(m_IsLockFront)	{		FrontLock.Lock(m_FrontLock);	}	CAutoLockEx BackLock;	if(m_IsLockBack)	{		BackLock.Lock(m_BackLock);	}		if(Size<=SmoothSize*2)	{		return FALSE;	}	m_pBuffer=(BYTE *)pBuff;	m_BufferSize=Size-SmoothSize;	m_SmoothSize=SmoothSize;	m_BufferHead=0;	m_BufferTail=0;		m_IsSelfBuffer=false;	return TRUE;}
开发者ID:EnoroF,项目名称:easygamelibs,代码行数:27,


示例7: Destory

BOOL CNetPTCPConnection::Create(UINT RecvQueueSize,UINT SendQueueSize){	if(GetServer()==NULL)		return FALSE;	Destory();	if(m_pEpollEventRouter==NULL)	{		m_pEpollEventRouter=GetServer()->CreateEventRouter();		m_pEpollEventRouter->Init(this);	}	m_Socket.MakeSocket(AF_INET,SOCK_STREAM,IPPROTO_TCP);	if(m_SendQueue.GetBufferSize()<SendQueueSize)	{		m_SendQueue.Create(SendQueueSize);	}	else	{		m_SendQueue.Clear();	}	return TRUE;}
开发者ID:EnoroF,项目名称:easygamelibs,代码行数:29,


示例8: Destory

AudioInputEngine::~AudioInputEngine(void){    if (bInit)    {        Destory();    }}
开发者ID:uvbs,项目名称:V8,代码行数:7,


示例9: Destory

CDBTransationWorkThread::~CDBTransationWorkThread(void){	SS_TRY_BEGIN;	Destory();	SS_TRY_END();}
开发者ID:clauschen123,项目名称:horse,代码行数:7,


示例10: send

bool CGameSocket::Flush(){	if (m_sockClient == INVALID_SOCKET)		return false;	if (m_nOutBufLen <= 0)		return true;	int nOutSize = send(m_sockClient, m_outBuf, m_nOutBufLen, 0);	//CCLOG("send size: %d", nOutSize);	if (nOutSize > 0)	{		if (m_nOutBufLen - nOutSize > 0)		{			memcpy(m_outBuf, m_outBuf + nOutSize, m_nOutBufLen - nOutSize);		}		m_nOutBufLen -= nOutSize;		assert(m_nOutBufLen >= 0);		return Flush();	}	else	{		if (hasError())		{			Destory();			return false;		}		return true;	}}
开发者ID:DLsoftware,项目名称:socketNet,代码行数:33,


示例11: __DestoryAux

inline void __DestoryAux(ForwardIterator first, ForwardIterator last, __FalseType){	while (first < last)	{		Destory(&(*first));		first++;	}}
开发者ID:wsy081414,项目名称:CPP-practice,代码行数:8,


示例12: Destory

void ConformalResizing::ConstrainUnits::SetNumber(int _n){	Destory();	n = _n;	CmAssert(n != 0);	pnts = new CvPoint2D64f[n];	ind = new int[n];}
开发者ID:LyqSpace,项目名称:ImageRetarget-CMM,代码行数:8,


示例13: DeleteChild

Status DeleteChild(TREE_TYPE tree, TREE_NODE* node, int position) {	if (position == 1) {		Destory(&(node -> first_child));	} else {		int order = 1;		TREE_NODE *child = node -> first_child;		while (order < position - 1) {			child = child -> next_sibling;			order++;		}		TREE_NODE *n = child -> next_sibling;		child -> next_sibling = child -> next_sibling -> next_sibling;		n -> next_sibling = NULL;		Destory(&n);	}	return OK;}
开发者ID:yuandong1222,项目名称:DataStructureInC,代码行数:18,


示例14: main

int main(int argc, char *argv[]){    ST my_st;    my_st = Init_ST();    Create(my_st , "info_file");    Traverse(my_st);    printf("Find the 14 index is %d/n",Search(my_st , 56));    Destory(my_st);}
开发者ID:qeesung,项目名称:data-struct,代码行数:9,


示例15: test_Destory

void test_Destory(void) {	BINARY_TREE_TYPE tree = get_test_tree("1,2,3,4,5");	if (tree == NULL)		return;	Status status = Destory(&tree);	CU_ASSERT_EQUAL(status, OK);	CU_ASSERT_PTR_NULL(tree);}
开发者ID:yuandong1222,项目名称:DataStructureInC,代码行数:9,


示例16: Destory

        /**        * Build topology of triangle mesh        *        * @param       trimesh:     input triangle mesh        * @param       fBuildVert:  true indicate build vert_topo, or skip vert_topo        * @return      true:        success        *              false:       failed        */        bool niTriMesh2dTopo::BuildTopology(const niTriMesh2d& trimesh, bool fBuildVert)        {            Destory();            bool bStat;            if (!trimesh.IsValid())                return false;            int num_verts = trimesh.NumPoints();            int num_faces = trimesh.NumFaces();            try            {                m_v2ef_list.resize(num_verts);                m_f2ve_list.resize(num_faces);            }            catch (std::bad_alloc)            {                Destory();                return false;            }            bStat = BuildEdge2VF(trimesh);            if (!bStat)                return bStat;            bStat = BuildFace2VE(trimesh);            if (!bStat)                return bStat;            if (fBuildVert)            {                bStat = BuildVert2EF(trimesh);                if (!bStat)                    return bStat;            }            if (fBuildVert)                m_valid = true;            return true;        }
开发者ID:guangmushikong,项目名称:UAVRouter,代码行数:51,


示例17: test_Destory

void test_Destory(void) {	Status status = ERROR;	GENERALIZED_LIST_TYPE list = getGeneralizedList("(1,2,3,4)");	if (list == NULL)		return;	status = Destory(&list);	CU_ASSERT_EQUAL(status, OK);	CU_ASSERT_PTR_NULL(list);}
开发者ID:yuandong1222,项目名称:DataStructureInC,代码行数:10,


示例18: Initialize

voidGameEngine::Run(){    if (!mInitialized)    {        Initialize();    }    Loop();    Destory();}
开发者ID:Lywx,项目名称:FalconEngine,代码行数:11,


示例19: Destory

void CDBValue::operator=(const CEasyTime& Value){	Destory();		DB_TIMESTAMP DBValue;	DBValue.year=((CEasyTime)Value).Year();	DBValue.month=((CEasyTime)Value).Month();	DBValue.day=((CEasyTime)Value).Day();	DBValue.hour=((CEasyTime)Value).Hour();	DBValue.minute=((CEasyTime)Value).Minute();	DBValue.second=((CEasyTime)Value).Second();	DBValue.fraction=((CEasyTime)Value).Milliseconds();	SetValue(DB_TYPE_TIMESTAMP,&DBValue,sizeof(DB_TIMESTAMP),0);}
开发者ID:EnoroF,项目名称:easygamelibs,代码行数:13,


示例20: Destory

HRESULT CTTProtectDlg::OnSendRptFinish(WPARAM wparam, LPARAM lparam){	if (m_pSendRpt)	{		m_pSendRpt->Shutdown();		m_pSendRpt->Release();	}	if (m_bClickOK)		Destory();	else		m_bSendFinish = TRUE;	return S_OK;}
开发者ID:3rdexp,项目名称:TTWinClient,代码行数:14,


示例21: test_Destory

void test_Destory(void) {	WordIndexList list = NULL;	Status status = 0;	status = Initial(&list);	CU_ASSERT_EQUAL(status, OK);	CU_ASSERT_PTR_NOT_NULL(list);	if (list == NULL)		return;	status = Destory(&list);	CU_ASSERT_EQUAL(status, OK);	CU_ASSERT_PTR_NULL(list);}
开发者ID:yuandong1222,项目名称:DataStructureInC,代码行数:14,


示例22: Destory

BOOL CGrowBuffer::Create(UINT InitSize,UINT GrowSize){	Destory();	m_BufferNodes=new BUFFER_NODE[BUFFER_NODE_INIT_SIZE];	m_BufferNodeCount=BUFFER_NODE_INIT_SIZE;	m_UsedBufferNodeCount=1;	m_CurBufferNodeIndex=0;	m_BufferSize=InitSize;	m_UsedSize=0;	m_FirstSize=InitSize;	m_GrowSize=GrowSize;	m_BufferNodes[0].pBuffer=new char[m_FirstSize];	m_BufferNodes[0].BufferSize=m_FirstSize;	m_BufferNodes[0].UsedSize=0;	return TRUE;}
开发者ID:EnoroF,项目名称:easygamelibs,代码行数:16,


示例23: Destory

void  Monster_UI::updateWay(){	if (isDone == false)return;	if (queue_way.size() <= 0)	{		auto x = (Scene_UI*)sprite->getParent();		if (x->view_king != 0)		{			x->view_king->beenAttack(damage);			Destory(true);		}		return;	}	float len = abs(sprite->getPosition().x - (queue_way.front().x * 80 + 40)) +		abs(sprite->getPosition().y - (queue_way.front().y * 80 + 40));	auto a2 = MoveTo::create(0.0001*moveSpeed*len,		PublicFunc::convertToPoint(queue_way.front().x, queue_way.front().y)		);	a2->setTag(2);	sprite->runAction(a2);	auto a3 = Sequence::create(		DelayTime::create(0.0001*moveSpeed*len)		, CallFunc::create([=]()	{		isDone = true;		queue_way.pop();	}), nullptr);	a3->setTag(3);	sprite->runAction(a3);	isDone = false;}
开发者ID:dreamyouxi,项目名称:Defend,代码行数:47,


示例24: Destory

BOOL CVideoRect::Create(LPCTSTR FileName,bool ForceLoadDirectVobSub){	if(m_pRender==NULL)		return FALSE;	Destory();	m_SubMesh.GetMaterial().ClearAllTexture();	m_pVideoTexture=new CD3DVideoTexture();	m_pVideoTexture->SetManager(m_pRender->GetDevice()->GetTextureManager());	m_pVideoTexture->EnableForceLoadVobSub(ForceLoadDirectVobSub);	m_SubMesh.GetMaterial().AddTexture(m_pVideoTexture,0,"","");	m_pVideoTexture->AddUseRef();	CD3DFX * pFX=m_pRender->GetDevice()->GetFXManager()->		LoadFXFromMemory("DefaultVideoFX",DEFAULT_VIDEO_FX,(int)strlen(DEFAULT_VIDEO_FX));	if(pFX)	{		m_SubMesh.GetMaterial().SetFX(pFX);			}				if(!m_pVideoTexture->Create(FileName))	{		m_pVideoTexture->Destory();		return FALSE;	}			m_pRender->GetDevice()->GetTextureManager()->AddTexture(m_pVideoTexture,m_pVideoTexture->GetName());	//int Width,Height;	//m_pVideoTexture->GetVideoSize(Width,Height);	//m_Rect.left=0;	//m_Rect.top=0;	//m_Rect.right=Width;	//m_Rect.bottom=Height;	CreateVertex();	SetVisible(true);	return TRUE;}
开发者ID:sagasarate,项目名称:easy-player,代码行数:44,


示例25: Lock1

bool CNetConnection::StealFrom(CNameObject * pObject,UINT Param){	CAutoLock Lock1(m_RecvLock);	CAutoLock Lock2(m_SendLock);	PrintNetLog(0xffffffff,"(%d)执行连接替换(%d)!",GetID(),pObject->GetID());	if(pObject->IsKindOf(GET_CLASS_INFO(CNetConnection)))	{		Destory();		if(!CNameObject::StealFrom(pObject,Param))			return false;		CNetConnection * pConnection=(CNetConnection *)pObject;		if(!m_Socket.StealFrom(&(pConnection->m_Socket),Param))			return false;				m_pServer=pConnection->m_pServer;		m_WantClose=pConnection->m_WantClose;		m_pEpollEventRouter=pConnection->m_pEpollEventRouter;		pConnection->m_pEpollEventRouter=NULL;		if(m_pEpollEventRouter)			m_pEpollEventRouter->SetEventHander(this);						CEpollEventObject * pEpollEventObject;		m_RecvQueue.Create(pConnection->m_RecvQueue.GetBufferSize());				while(pConnection->m_RecvQueue.PopFront(pEpollEventObject))		{			m_RecvQueue.PushBack(pEpollEventObject);		}				m_SendQueue.Create(pConnection->m_SendQueue.GetBufferSize());				while(pConnection->m_SendQueue.PopFront(pEpollEventObject))		{			m_SendQueue.PushBack(pEpollEventObject);		}			return true;			}	return false;}
开发者ID:EnoroF,项目名称:easygamelibs,代码行数:44,


示例26: shortext_path_build_result

void shortext_path_build_result(GRAPHIC_TYPE graphic, 		VERTEX_TYPE *vertex, 		int* path, 		ShortestPathResultNode** result) {	int i = 0, j = 0, count = 0;	int vertex_count = graphic -> vertex_count;	int vertex_index = vertex - graphic -> vertex_list;	*result = (ShortestPathResultNode*)malloc(sizeof(ShortestPathResultNode) * vertex_count - 1);	for (i = 0; i < vertex_count; i++) {		if (i == vertex_index) {			continue;		}		(*result + count) -> end_vertex = (AdjacentMatrixGraphicVertex*)malloc(sizeof(AdjacentMatrixGraphicVertex));		(*result + count) -> end_vertex -> is_empty = FALSE;		(*result + count) -> end_vertex -> value = (graphic -> vertex_list)[i].value;		AdjacentMatrixGraphic *result_graphic = &((*result + count) -> graphic);		Initial(result_graphic);		int start_vertex_index = vertex_index;		for (j = 0; j < vertex_count; j++) {			int end_vertex_index = path[i * vertex_count + j];			if (end_vertex_index == -1) {				continue;			}			AdjacentMatrixGraphicVertex *start_vertex = graphic -> vertex_list + start_vertex_index;			AdjacentMatrixGraphicVertex *end_vertex = graphic -> vertex_list + end_vertex_index;			int arc_weight = (graphic -> arc_list)[start_vertex_index][end_vertex_index];			result_insert_arc(result_graphic, start_vertex, end_vertex, arc_weight);			start_vertex_index = end_vertex_index;		}		if (start_vertex_index == vertex_index) {			Destory(result_graphic);		}		count++;	}}
开发者ID:yuandong1222,项目名称:DataStructureInC,代码行数:42,



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


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