Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100770 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38352 invoked from network); 25 Sep 2017 10:46:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2017 10:46:40 -0000 Authentication-Results: pb1.pair.com header.from=oneil@saxonica.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=oneil@saxonica.com; spf=permerror; 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:60007] helo=uk1mail2513-b.mymailbank.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 96/78-05407-E8ED8C95 for ; Mon, 25 Sep 2017 06:46:39 -0400 Received: from [10.0.0.7] (UnknownHost [82.152.109.221]) by uk1mail2513-d.mymailbank.co.uk with SMTP; Mon, 25 Sep 2017 11:46:22 +0100 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) In-Reply-To: Date: Mon, 25 Sep 2017 11:46:33 +0100 Cc: Sara Golemon , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <4DE419BB-2630-44B8-B4E7-98E17BEBE749@saxonica.com> <29B0DEA4-2022-4656-8A61-C3D89DB8D5D2@saxonica.com> To: O'Neil Delpratt X-Mailer: Apple Mail (2.3124) Subject: Re: [PHP-DEV] PHP extension - Saxon/C From: oneil@saxonica.com (O'Neil Delpratt) Problem resolved. It was actually the following line I had still there: = Z_ADDREF_P(oth); > On 25 Sep 2017, at 11:36, O'Neil Delpratt wrote: >=20 > Ok. Thanks for taking a look. >=20 > Potenial problem could be the following line: >=20 > const char * objName =3DZSTR_VAL(Z_OBJCE_P(oth)->name); >=20 >=20 > I think I need to free the objName some how. >=20 >=20 >> On 22 Sep 2017, at 18:42, Sara Golemon wrote: >>=20 >>>> On Fri, Sep 22, 2017 at 12:21 PM, O'Neil Delpratt = 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. >>>>=20 >>> The Following gives leak: >>>=20 >>> $proc =3D Saxon/SaxonProcessor >>>=20 >>> $xquery =3D $proc->NewXQueryProcessor() >>>=20 >>> $sourceNode =3D $proc->parseXmlFromString("=E2=80=9D); >>>=20 >>> $xquery->setContextItem($sourceNode); // with this line commented = out there is no leak. >>>=20 >> Okay, well the bad news is that assuming the extension you're working >> with is the link you gave initially and you did remove the >> Z_ADDREF_P() from XQueryProcessor::setContextItem()... I can't point >> to why you'd have a memory leak. >>=20 >> -Sara >=20 >=20 >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20