mxmlDelete () usage

got_mask2

New Member
I use mxml library to parse XML file in C language. I load my XML in buffer using the following code:\[code\]mxml_node_t *tree; tree = mxmlLoadString(NULL,XMLbuf,MXML_OPAQUE_CALLBACK);\[/code\]The XML file is complicated but this is irrelevant at the moment.My question is : when I should free memory used by the mxml library functions? Is it enough to use code like this once and for all:\[code\]mxmlDelete(tree);\[/code\]or I have to repeat that for every node of my \[code\]XML.(mxmlDelete(node1);mxmlDelete(node2);\[/code\] until I reach \[code\]mxmlDelete(tree);\[/code\]?
 
Back
Top