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(); }
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; }