当前位置: 首页>>代码示例>>C++>>正文


C++ debug_delete函数代码示例

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


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

示例1: RemoveObjectives

void CMenuMission::Term()
{

	//take anything we've cached out of the list, so that we
	// don't try to delete them twice
	RemoveObjectives();

	//delete our cache
	ControlArray::iterator iter = m_Objectives.begin();
	while (iter != m_Objectives.end())
	{
		debug_delete(*iter);
		iter++;
	}
	m_Objectives.clear();

	if (m_pObjLabel)
	{
		debug_delete(m_pObjLabel);
		m_pObjLabel = LTNULL;
	}
	if (m_pParameters)
	{
		debug_delete(m_pParameters);
		m_pParameters = LTNULL;
	}

	CBaseMenu::Term();
}
开发者ID:emoose,项目名称:lithtech,代码行数:29,代码来源:MenuMission.cpp

示例2: while

void CHUDMessageQueue::Term()
{
	MessageArray::iterator iter = m_ActiveMsgs.begin();
	while (iter !=  m_ActiveMsgs.end())
	{
		CHUDMessage *pMsg = (*iter);
		pMsg->Destroy();
		debug_delete(pMsg);
		iter++;
	}

	iter = m_HistoryMsgs.begin();
	while (iter !=  m_HistoryMsgs.end())
	{
		CHUDMessage *pMsg = (*iter);
		pMsg->Destroy();
		debug_delete(pMsg);
		iter++;
	}

	MCArray::iterator mcIter = m_History.begin();
	while (mcIter != m_History.end())
	{
		debug_delete((*mcIter));
		mcIter++;
	}


}
开发者ID:rickyharis39,项目名称:nolf2,代码行数:29,代码来源:HUDMessageQueue.cpp

示例3: debug_new

// Creation
LTBOOL CListCtrl::Create ( int nHeight, LTBOOL bUseArrows, int nArrowOffset)
{
	m_nHeight=nHeight;
    m_bCreated=LTTRUE;

	if (bUseArrows)
	{
        m_bArrows       = LTTRUE;
		m_nArrowOffset	= nArrowOffset;
		//Add Server Arrows
		m_pUp = debug_new(CBitmapCtrl);
        if (!m_pUp->Create(g_pLTClient,"interface\\ListArrowUp.pcx","interface\\ListArrowUpH.pcx","interface\\ListArrowUpD.pcx"))
		{
			debug_delete(m_pUp);
            m_pUp = LTNULL;
		}

		m_pDown = debug_new(CBitmapCtrl);
        if (!m_pDown->Create(g_pLTClient,"interface\\ListArrowDn.pcx","interface\\ListArrowDnH.pcx","interface\\ListArrowDnD.pcx"))
		{
			debug_delete(m_pDown);
            m_pDown = LTNULL;
		}

	}

    return LTTRUE;
}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:29,代码来源:ListCtrl.cpp

示例4: UpdateLayout

LTBOOL CHUDMessageQueue::Init()
{
	UpdateLayout();

	g_pLTClient->RegisterConsoleProgram("SimulateChat", SimulateChatFn);

	ASSERT(m_nMaxActiveMsgs);
	if (!m_nMaxActiveMsgs) return LTFALSE;

	m_ActiveMsgs.reserve(m_nMaxActiveMsgs);
	m_HistoryMsgs.reserve(m_nMaxHistoryMsgs);

	m_History.reserve(32);


	MsgCreate fmt = m_MsgFormat;
	fmt.sString = "";
	fmt.fDuration = 0.0f;

	for (int i = 0; i < m_nMaxActiveMsgs; i++)
	{
		CHUDMessage *pMsg = debug_new(CHUDMessage);
		if (pMsg->Create(fmt))
		{
			pMsg->Show(LTFALSE);
			m_ActiveMsgs.push_back(pMsg);
		}
		else
		{
			debug_delete(pMsg);
		}
	}

	for (i = 0; i < m_nMaxHistoryMsgs; i++)
	{
		CHUDMessage *pMsg = debug_new(CHUDMessage);
		if (pMsg->Create(fmt))
		{
			pMsg->Show(LTFALSE);
			m_HistoryMsgs.push_back(pMsg);
		}
		else
		{
			debug_delete(pMsg);
		}
	}

	return LTTRUE;

}
开发者ID:rickyharis39,项目名称:nolf2,代码行数:50,代码来源:HUDMessageQueue.cpp

示例5: debug_delete

uint16 CBaseMenu::AddControl (char *pString, uint32 commandID, LTBOOL bStatic)
{
	CUIFont* pFont = g_pInterfaceResMgr->GetFont(m_FontFace);
	if (!pFont) return -1;

	CLTGUITextCtrl* pCtrl=debug_new(CLTGUITextCtrl);
    if (!pCtrl->Create(pString, commandID, LTNULL, pFont, m_FontSize, this))
	{
		debug_delete(pCtrl);
        return -1;
	}

	pCtrl->SetBasePos(m_nextPos);
	if (bStatic)
	{
		pCtrl->SetColors(m_NonSelectedColor,m_NonSelectedColor,m_NonSelectedColor);
		pCtrl->Enable(LTFALSE);
	}
	else
		pCtrl->SetColors(m_SelectedColor,m_NonSelectedColor,m_DisabledColor);
	pCtrl->SetScale(g_pInterfaceResMgr->GetXRatio());

	return m_List.AddControl(pCtrl);

}
开发者ID:rickyharis39,项目名称:nolf2,代码行数:25,代码来源:BaseMenu.cpp

示例6: debug_new

CAnimationTreePacked* CAnimationTreePackedMgr::CreateAnimationTreePacked( const char* pszFilename )
{
	// Create a new tree.

	CAnimationTreePacked* pTree = debug_new( CAnimationTreePacked );

	// Bail if we fail to load the specified packed anim tree file.

	CAnimationTreePackedLoader Loader;
	if( !Loader.LoadAnimationTreePacked( pTree, pszFilename ) )
	{
		debug_delete( pTree );
		return NULL;
	}

	// Assign the new tree a unique ID.

	pTree->m_eTreeID = (AT_TREE_ID)m_iNextTreeID;
	++m_iNextTreeID;

	// Assign global transition IDs.
	// These IDs allow searching for transitions across multiple trees.

	AssignGlobalTransitionIDs( pTree );

	// Add the new tree to the list.

	m_lstAnimTrees.push_back( pTree );
	return pTree;
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:30,代码来源:AnimationTreePackedMgr.cpp

示例7: debug_deletea

void CClientFXDB::Term()
{
	//empty out our types
	debug_deletea(m_pEffectTypes);
	m_pEffectTypes		= NULL;
	m_nNumEffectTypes	= 0;

	// Delete all the FX groups
	CLinkListNode<FX_GROUP *> *pGroupNode = m_collGroupFX.GetHead();

	while (pGroupNode)
	{
		//delete all the key property lists
		for(uint32 nCurrKey = 0; nCurrKey < pGroupNode->m_Data->m_nNumKeys; nCurrKey++)
		{
			if(m_pfnFreePropList)
			{
				m_pfnFreePropList(pGroupNode->m_Data->m_pKeys[nCurrKey].m_pProps);
				pGroupNode->m_Data->m_pKeys[nCurrKey].m_pProps = NULL;
			}
		}

		debug_delete( pGroupNode->m_Data );		
		pGroupNode = pGroupNode->m_pNext;
	}
	m_collGroupFX.RemoveAll();

	UnloadFxDll();
}
开发者ID:bibendovsky,项目名称:ltjs,代码行数:29,代码来源:clientfxdb.cpp

示例8: ClearTouchSoundIfDone

Prop::~Prop()
{
	ClearTouchSoundIfDone( LTTRUE );
	ClearHitSoundIfDone( LTTRUE );

	debug_delete(m_pDisturb);
}
开发者ID:rickyharis39,项目名称:nolf2,代码行数:7,代码来源:Prop.cpp

示例9: Init

CScreenSprite * CScreenSpriteMgr::CreateScreenSprite(char * pFile, bool bExpires, ScreenSpriteLayer eLayer)
{
	// Make sure the ScreenSpriteMgr is operational
	if (!m_bInitialized)
		Init();

	CScreenSprite * pSpr = debug_new(CScreenSprite);
	pSpr->Init();

	bool bResult = GiveSpriteResources(pSpr, pFile);

	if (!bResult)
	{
		debug_delete(pSpr);
		return LTNULL;
	}

	pSpr->SetExpiration(bExpires);
	pSpr->m_eLayer = eLayer;		// determine the draw-order with the layer number

//	m_SpriteArray.push_back(pSpr);
	ScreenSpriteArray::iterator iter = m_SpriteArray.begin();
	while (iter != m_SpriteArray.end())
	{
		if (pSpr->m_eLayer <= (*iter)->m_eLayer)
		{
			m_SpriteArray.insert(iter, pSpr);
			return pSpr;
		}
		iter++;
	}
	// pSpr didn't come before anything in the array, or the array is empty.  Add it
	m_SpriteArray.push_back(pSpr);	
	return pSpr;
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:35,代码来源:ScreenSpriteMgr.cpp

示例10: debug_delete

// Destroy the control
void CListCtrl::Destroy ( )
{
	m_controlArray.RemoveAll();

	if (m_pUp)
	{
		debug_delete(m_pUp);
        m_pUp = LTNULL;
	}
	if (m_pDown)
	{
		debug_delete(m_pDown);
        m_pDown = LTNULL;
	}
    m_bCreated=LTFALSE;
}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:17,代码来源:ListCtrl.cpp

示例11: return

CTeamPlayer* CTeam::AddPlayer(uint32 dwPlayerID, uint32 dwFlags)
{
	// Make sure this player doesn't already exist...

	if (GetPlayer(dwPlayerID))
	{
		return(NULL);
	}


	// Create and init a new player...

	CTeamPlayer* pPlayer = debug_new(CTeamPlayer);
	if (!pPlayer) return(NULL);

	if (!pPlayer->Init(dwPlayerID, dwFlags))
	{
		debug_delete(pPlayer);
        return(LTFALSE);
	}


	// Add the new player to our list...

	if (!AddPlayer(pPlayer))
	{
        return(LTFALSE);
	}


	// All done...

	return(pPlayer);
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:34,代码来源:TeamMgr.cpp

示例12: BuildPolyDebrisFXList

LTBOOL BuildPolyDebrisFXList(PolyDebrisFXList & list, CButeMgr & buteMgr,
							char* pTagBase)
{
    if (!pTagBase) return LTFALSE;

	int nNum = 0;
	sprintf(s_aTagName, "%s%d", pTagBase, nNum);

	// Read in the properties for each scale fx...

	while (buteMgr.Exist(s_aTagName))
	{
		CPolyDebrisFX* pFX = debug_new(CPolyDebrisFX);

		if (pFX && pFX->Init(buteMgr, s_aTagName))
		{
			pFX->nId = nNum;
			list.AddTail(pFX);
		}
		else
		{
			debug_delete(pFX);
            return LTFALSE;
		}

		nNum++;
		sprintf(s_aTagName, "%s%d", pTagBase, nNum);
	}

    return LTTRUE;
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:31,代码来源:FXStructs.cpp

示例13: while

void CMenuMgr::Term()
{
	//term menus
	MenuArray::iterator iter = m_MenuArray.begin();
	while (iter != m_MenuArray.end())
	{
		(*iter)->Term();
		iter++;
	}

	//clear menu array
	m_MenuArray.clear();

	//term menus
	KeyArray::iterator kiter = m_HotKeys.begin();
	while (kiter != m_HotKeys.end())
	{
		debug_delete(*kiter);
		kiter++;
	}

	//clear menu array
	m_HotKeys.clear();

}
开发者ID:Arc0re,项目名称:lithtech,代码行数:25,代码来源:MenuMgr.cpp

示例14: while

CClientInfoMgr::~CClientInfoMgr()
{
    CLIENT_INFO* ptr = LTNULL;
	while (m_pClients)
	{
		ptr = m_pClients->pNext;
		g_pLTClient->FreeString (m_pClients->hstrName);
		debug_delete(m_pClients);
		m_pClients = ptr;
	}

	if (m_hFragString)
	{
		g_pLTClient->FreeString(m_hFragString);
	    m_hFragString = LTNULL;
	}
	if (m_hTeamScore)
	{
		g_pLTClient->FreeString(m_hTeamScore);
	    m_hTeamScore = LTNULL;
	}
	if (m_hOppScore)
	{
		g_pLTClient->FreeString(m_hOppScore);
	    m_hOppScore = LTNULL;
	}

}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:28,代码来源:ClientInfoMgr.cpp

示例15: sprintf

LTBOOL CSoundFilterMgr::Init(const char* szAttributeFile)
{
    if (g_pSoundFilterMgr || !szAttributeFile) return LTFALSE;
    if (!Parse(szAttributeFile)) return LTFALSE;

	g_pSoundFilterMgr = this;

	// Read in the properties for each sound filter record...

	int nNum = 0;
	sprintf(s_aTagName, "%s%d", SFM_TAG, nNum);

	while (m_buteMgr.Exist(s_aTagName))
	{
		SOUNDFILTER* pFilter = debug_new(SOUNDFILTER);

		if (pFilter && pFilter->Init(m_buteMgr, s_aTagName))
		{
			pFilter->nId = nNum;
			m_FilterList.AddTail(pFilter);
		}
		else
		{
			debug_delete(pFilter);
            return LTFALSE;
		}

		nNum++;
		sprintf(s_aTagName, "%s%d", SFM_TAG, nNum);
	}


    return LTTRUE;
}
开发者ID:emoose,项目名称:lithtech,代码行数:34,代码来源:SoundFilterMgr.cpp


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