Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10315 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7529 invoked by uid 1010); 8 Jun 2004 13:18:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 7449 invoked from network); 8 Jun 2004 13:18:04 -0000 Received: from unknown (HELO coogle.localdomain) (68.61.83.224) by pb1.pair.com with SMTP; 8 Jun 2004 13:18:04 -0000 Received: from coogle.localdomain (coogle.localdomain [127.0.0.1]) by coogle.localdomain (8.12.8/8.12.8) with ESMTP id i58DHpQD002461; Tue, 8 Jun 2004 09:17:52 -0400 Received: (from john@localhost) by coogle.localdomain (8.12.8/8.12.8/Submit) id i58DHoZv002459; Tue, 8 Jun 2004 09:17:50 -0400 X-Authentication-Warning: coogle.localdomain: john set sender to john@coggeshall.org using -f Reply-To: john@coggeshall.org To: Christian Stocker Cc: Nuno Lopes , PHP Internals In-Reply-To: <40C5A9EF.5010503@bitflux.ch> References: <40C5959A.2010600@bitflux.ch> <009f01c44d45$51d9d8d0$0100a8c0@pc07653> <40C5A9EF.5010503@bitflux.ch> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-ID: <1086700670.2447.0.camel@coogle.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Tue, 08 Jun 2004 09:17:50 -0400 Subject: Re: [PHP-DEV] Mem Leak in Tidy, ZE2 Bug? From: john@coggeshall.org (John Coggeshall) I'll poke around at it today John On Tue, 2004-06-08 at 07:58, Christian Stocker wrote: > On 8.6.2004 12:42 Uhr, Nuno Lopes wrote: > > >>Hi > >> > >>I'm not sure, who to blame about this one, but I run against a memory > >>leak if I run the following code: > >>*** > >>$html = "foo"; > >>$options = array("char-encoding" => "utf8"); > >>$tidy = new tidy(); > >>$tidy->parseString($html,$options,$options['char-encoding']); > >>print $tidy; > >>*** > >> > >>If the 3rd param is not part of the array of the second param, there's > >>no memleak.. > >>Any ideas, what's going wrong here? > > > > > > I have no problems here. > > You shouldn't use the char-encoding as option (the second paramether)!! You > > should just set the last parameter, as it will set the input and ouput > > charset!! > > See Derick's answer, that's not the point ;) > > Anyway, I filed a bug report for tidy (there was also a second memleak) at > http://pecl.php.net/bugs/bug.php?id=1580 > > chregu > -- > christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich > phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 > http://www.bitflux.ch | chregu@bitflux.ch | gnupg-keyid 0x5CE1DECB -- -=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=- John Coggeshall http://www.coggeshall.org/ The PHP Developer's Handbook http://www.php-handbook.com/ -=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-