List Info

Thread: Question about xmlCleanupParser()




Question about xmlCleanupParser()
user name
2006-09-19 14:58:43
> > The question is: if someone uses my library and
also uses 
> libxml by his own in a process, my call to
xmlCleanupParser 
> would affect the other instance of libxml?
> 
> yes, so don't call it, at worse you will just lost a
bit of 
> data global to the
> library.

As I don´t know who is going to use my library and how
(wheter the process will be using libxml by his own or not),
if one process loads, uses and unloads my library several
times, the memory leak would be cumulative?

In case it's cumulative, it's there the posibility to have
xmlCleanupParser() be called when libxml unloads? (like in
the destructor/Dllmain, or atexit in libxml itself?)


Unai Astorquiza San Nicolás 
Dpto. I+D
MailTo: uastorquizapandasoftware.es

Panda Software
Protección contra virus, spyware, hackers, spam y otras
amenazas de Internet
Buenos Aires, 12
48001 BILBAO - ESPAÑA
Teléfono: 902 24 365 4
Fax:  94 424 46 97

Panda Software es una empresa líder en el desarrollo y
suministro de soluciones integradas de seguridad para
combatir virus, hackers, troyanos, spyware, phishing, spam y
otras amenazas de Internet. Con sus revolucionarias
Tecnologías TruPrevent(tm), las innovadoras soluciones de
Panda Software ofrecen una mayor rentabilidad de la
inversión, manteniendo a los clientes protegidos incluso
contra las nuevas amenazas que todavía no han sido
identificadas. Más información en www.pandasoftware.es

¡Protéjase ahora contra virus, spyware, hackers, spam y
otras amenazas de Internet!

Pruebe gratis nuestros productos en
www.pandasoftware.es/descargas


> -----Mensaje original-----
> De: Daniel Veillard [mailto:veillardredhat.com]
> Enviado el: martes, 19 de septiembre de 2006 16:48
> Para: Unai Astorquiza
> CC: xmlgnome.org
> Asunto: Re: [xml] Question about xmlCleanupParser()
> 
> 
> On Tue, Sep 19, 2006 at 04:35:37PM +0200, Unai
Astorquiza wrote:
> > Hi,
> > 
> > I'm having a crash when I call xmlCleanupParser()
and I've 
> some doubts about the use of this function.
> > 
> > I'm developing a library that loads and uses
libxml, and I 
> call xmlCleanupParser in the destructor/DllMain of the 
> library, when I'm finished using it.
> > 
> > The question is: if someone uses my library and
also uses 
> libxml by his own in a process, my call to
xmlCleanupParser 
> would affect the other instance of libxml?
> 
> yes, so don't call it, at worse you will just lost a
bit of 
> data global to the
> library.
> 
> Daniel
> 
> -- 
> Red Hat Virtualization group http://redhat.com/v
irtualization/
> Daniel Veillard      | virtualization library  http://libvirt.org/
> veillardredhat.com  | libxml GNOME XML XSLT
toolkit  
> http://xmlsoft.org/
> http://veillard.com/
| Rpmfind RPM search engine  http://rpmfind.net/
> 
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
Question about xmlCleanupParser()
user name
2006-09-19 15:01:54
On Tue, Sep 19, 2006 at 04:58:43PM +0200, Unai Astorquiza
wrote:
> > > The question is: if someone uses my library
and also uses 
> > libxml by his own in a process, my call to
xmlCleanupParser 
> > would affect the other instance of libxml?
> > 
> > yes, so don't call it, at worse you will just
lost a bit of 
> > data global to the
> > library.
> 
> As I don´t know who is going to use my library and how
(wheter the process will be using libxml by his own or not),
if one process loads, uses and unloads my library several
times, the memory leak would be cumulative?

 no, it should not.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/v
irtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillardredhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )