From: Sterling Hughes

> I think all memory handling should be done with PHP, as you can see
> there are many places in simplexml where I avoid a copy by relying on
> the fact that the libxml2 memory will be allocated by php's mm.

I saw that. Drove me nuts for a while as libxml kept reporting it as leaks.
Until the memory management is changed, libxml is currently allocating it
and php is free'ing the stuff (hence why it was reporting leaks).

I am fine with having PHP handle all memory management, but if this is the
case, I would say a function somewhere outside the xml extensions that is
called in MINIT of all the libxml enabled extensions. I cant say if this
will complicate debugging this stuff, but would like that noted as a
possible concern (if anyone would care to comment on it).

Then, do we even need to worry about re-entrance then?
So, we may define the same memory handling functions a few times.
xmlInitParser is already re-entrant safe.

Rob



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to