Re: PHP extension - Saxon/C
| From: | O'Neil Delpratt | Date: | Fri, 22 Sep 2017 16:21:42 +0000 |
| Subject: | Re: PHP extension - Saxon/C | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100754@lists.php.net to get a copy of this message | ||
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.
> On 22 Sep 2017, at 17:09, Sara Golemon <pollita@php.net> wrote:
>
> On Fri, Sep 22, 2017 at 7:01 AM, O'Neil Delpratt <oneil@saxonica.com> wrote:
>> Z_ADDREF_P(oth);
>>
> It's a little rough staring through all the commented out lines and
> inconsistent indenting, but this line stands out to me.
>
> Where is oth's refcount meant to be decremented? Why is it even being
> incremented in the first place? By having an extra reference, the
> engine doesn't know that it's supposed to clean up the object and free
> its storage.
>
> -Sara