Пример #1
0
void DataNode::RemoveAllChildren()
{
    for (std::vector<DataNode*>::iterator t = children.begin(); t != children.end(); ++t)
    {
        DataNode *node = *t;
        //node->SetParent(0);
        node->index = -1;
        node->Release();
    }
    children.clear();
}
Пример #2
0
		inline void SerialData::Append(SerialData * pIns)
		{
			DataNode * pNewNode = new DataNode(pIns->m_pPrev,m_pData,m_pPrev);
			
			m_pData->Release();
			m_pData = pIns->m_pData;
			pIns->m_pData->AddRef();
			
			if (m_pPrev)
				m_pPrev->Release();
			m_pPrev = pNewNode;
		}