Re: [xml] use of xmlXPathFreeNodeSet ?



Hello,

I have run an xpath search on an xmldocument.

Afterwards I call xmlXPathFreeContext and xmlXPathFreeNodeSet to release resources.

Should I call xmlfree on the nodes found in this nodeset before I use xmlXPathFreeNodeSet ?

I really don't think you need to delete the nodes yourself.
I don't know the context of your program, but I never had to use xmlXPathFreeNodeSet(), and instead relied on 
xmlXPathFreeObject(). Last time I ran Valgrind on my program, everything seemed ok.

Hope that helps,
Romain Bondue

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne 
doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez 
le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles 
d'alteration,
France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by 
law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its 
attachments.
As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed 
or falsified.
Thank you.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]