Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100754 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43660 invoked from network); 22 Sep 2017 16:21:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2017 16:21:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=oneil@saxonica.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=oneil@saxonica.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain saxonica.com from 217.69.43.196 cause and error) X-PHP-List-Original-Sender: oneil@saxonica.com X-Host-Fingerprint: 217.69.43.196 UK1MAIL2513-b.mymailbank.co.uk Received: from [217.69.43.196] ([217.69.43.196:53724] helo=uk1mail2513-b.mymailbank.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 88/9D-62331-3A835C95 for ; Fri, 22 Sep 2017 12:21:56 -0400 Received: from [192.168.0.11] (cpc81936-leic18-2-0-cust39.8-1.cable.virginm.net [82.6.254.40]) by uk1mail2513-d.mymailbank.co.uk with SMTP; Fri, 22 Sep 2017 17:21:21 +0100 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) In-Reply-To: Date: Fri, 22 Sep 2017 17:21:42 +0100 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <29B0DEA4-2022-4656-8A61-C3D89DB8D5D2@saxonica.com> References: <4DE419BB-2630-44B8-B4E7-98E17BEBE749@saxonica.com> To: Sara Golemon X-Mailer: Apple Mail (2.3124) Subject: Re: [PHP-DEV] PHP extension - Saxon/C From: oneil@saxonica.com (O'Neil Delpratt) 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 wrote: >=20 > On Fri, Sep 22, 2017 at 7:01 AM, O'Neil Delpratt = wrote: >> Z_ADDREF_P(oth); >>=20 > It's a little rough staring through all the commented out lines and > inconsistent indenting, but this line stands out to me. >=20 > 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. >=20 > -Sara