|
Hi All, I try understanding Memory Manager, see this code: ----------------------------------------------- �std::auto_ptr<XercesDOMParser> pParser(new XercesDOMParser()); �������
try { �����������
pParser->parse(m_strSelectedItemPathName); �������
} �������
catch (...) { �����������
return CString("Erro em obter a descri��o do projeto."); �������
} ����������� xercesc_2_6::DOMDocument* pDoc = pParser->getDocument(); ����������� DOMElement*
pRoot = pDoc->getDocumentElement(); ����������� DOMNodeList* pNodeList = pRoot->getElementsByTagName(X("projectdescription")); ����������� CString
strMsg; ����������� for ( int
i = 0 ; i <= (int)pNodeList->getLength() ; i++ ) ����������� { ����������������� DOMNode* pNode = pNodeList->item(i); ����������� ����������������� if(pNode != NULL) ����������������� { ����������������������� strMsg
= pNode->getTextContent(); ����������������� } ����������� } ----------------------------------------------- My doubt is, I don’t need release: DOMNode*
pNode, DOMElement*
pRoot and DOMDocument*
pDoc. When I release XercesDOMParser* pParser all others is
released together? How I know when I
need release? Thanks for help. -- Renato Tegon Forti -- Trinity Systems - Grupo Nova Am�rica |
- Re: Memory Manager Renato Tegon Forti
- Re: Memory Manager Gareth Reakes
