does XMLDOMNodePtr::get_text() needs to be deallocated explicitly?

Posted by Sammy on Stack Overflow See other posts from Stack Overflow or by Sammy
Published on 2010-03-25T05:22:44Z Indexed on 2010/03/25 5:53 UTC
Read the original article Hit count: 399

Filed under:
|
|

Greetings,

Would like to know if we need to explicitly free the string allocated by a xmldomnodeptr using it's get_text()

i.e.

    IXMLDOMNodePtr pNode;
    /*some code*/
    BSTR sValue;
    pNode->get_text(&sValue);
    /*Should I do this?*/
    SysFreeString(sValue);

I cannot see any documentation stating the same, so I'm assuming we need to do explicit deallocation sysfreestring. But, Just need to be double sure :)

Thanks in advance.

Samrat Patil.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about c++