[xml] [htmlParser] The right way to free a htmlParserCtxtPtr
- From: Emmanuel Saracco <esaracco users labs libre-entreprise org>
- To: xml gnome org
- Subject: [xml] [htmlParser] The right way to free a htmlParserCtxtPtr
- Date: Tue, 02 Nov 2004 06:46:16 +0100
Hi,
I am wondering what is the most effective to free a htmlParserCtxtPtr.
For the moment I do the following:
-----
htmlParserCtxtPtr ctxt = NULL;
ctxt = htmlCreateMemoryParserCtxt (buffer, strlen (buffer));
htmlParseDocument (ctxt);
htmlFreeParserCtxt (ctxt);
-----
But browing the libxml2 source code I saw that there is a "htmlCtxtReset
()" that seems to really freeing all stuff (including "ctxt->myDoc").
Should I call this function just before calling "htmlFreeParserCtxt ()"?
Thanks,
Bye
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]