Re: PHP extension - Saxon/C
| From: | O'Neil Delpratt | Date: | Fri, 22 Sep 2017 16:44:17 +0000 |
| Subject: | Re: PHP extension - Saxon/C | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100756@lists.php.net to get a copy of this message | ||
The Following gives leak:
$proc = Saxon/SaxonProcessor
$xquery = $proc->NewXQueryProcessor()
$sourceNode = $proc->parseXmlFromString("<foo />”);
$xquery->setContextItem($sourceNode); // with this line commented out there is no leak.
> On 22 Sep 2017, at 17:32, Sara Golemon <pollita@php.net> wrote:
>
> On Fri, Sep 22, 2017 at 12:21 PM, O'Neil Delpratt <oneil@saxonica.com> wrote:
>> I still have the memory leak without that line. I think I was thinking I need to add a
>> refcount to the XdmNode object, but maybe I am wrong.
>>
> What's the shortest possible script you can reproduce the leak with?
>
> Is (new XQueryProcessor()) enough? Do you need to call particular
> methods (like this one) with certain args?