Hello,
I have a question about using the Parse() API.
I'm using TinyXML on a WinCE 5.0 device and loading XML from memory, rather than from a file. My question is - do I need to keep the char buffer around after it has been parsed, or is it safe to delete [] it?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There's no problem with this, when TinyXML is parsing the document, it make copies of each piece of data it needs... Actually the method LoadFile of TiXMLDocment creates a temporary buffer ( an automatic string ), calls Parse and then the string goes out of scope causing the data to be deleted from memory...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have a question about using the Parse() API.
I'm using TinyXML on a WinCE 5.0 device and loading XML from memory, rather than from a file. My question is - do I need to keep the char buffer around after it has been parsed, or is it safe to delete [] it?
Thanks.
There's no problem with this, when TinyXML is parsing the document, it make copies of each piece of data it needs... Actually the method LoadFile of TiXMLDocment creates a temporary buffer ( an automatic string ), calls Parse and then the string goes out of scope causing the data to be deleted from memory...