Re: Question about xmlDoc->oldNs usage in php

Nick Wellnhofer <[email protected]> Mon, 15 Jun 2020 11:00:38 +0200
Newsgroups gmane.comp.gnome.lib.xml.general
Message-ID <[email protected]>
On 15/06/2020 05:04, Benjamin Eberlei wrote:
> Now I am wondering what oldNs is even used for here, it seems from the libxml 
> code it is really only needed to "cache" a pointer to the xmlNs that 
> represents "xml" and nothing more.

No, the oldNs list is also appended to in `xmlDOMWrapStoreNs`. It seems that 
this namespace list is only used for memory management. From a quick look, 
your changes to the PHP code will cause a memory leak.

Nick