Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43213 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48085 invoked from network); 27 Feb 2009 18:25:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2009 18:25:22 -0000 Authentication-Results: pb1.pair.com header.from=igor.feghali@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=igor.feghali@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.46.29 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: igor.feghali@gmail.com X-Host-Fingerprint: 74.125.46.29 yw-out-2324.google.com Received: from [74.125.46.29] ([74.125.46.29:41794] helo=yw-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/37-10839-11038A94 for ; Fri, 27 Feb 2009 13:25:22 -0500 Received: by yw-out-2324.google.com with SMTP id 9so862089ywe.83 for ; Fri, 27 Feb 2009 10:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=HZ6Uuhwbzty5Stdg4BmOznwseNrbSgZgDgk27t2KXgs=; b=UlOu8NQLo9eDuIGJq46HIAATRkhqKgg6uPsbJyfIHW+eoRhGwjMld93MbQZGiRhwrL VjyM/GaWzv/6hTLycaSauyUMiDRY+z81GKO+uL/UGK9GkqXT1aXEsNmn8808ekuGqdGE 8XPCCt4pCy1TjUfWPegk4eMy5I1OXlkovx/14= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=T0+lBRMWSN/kHM7z2WHnD8LTEOaPB7Fsbx92GV8IzpW3S8eUlLYniDVcwR/DX4DxbY 4UE+vxUAfvtQfrc8K6JOW/xcFBt7CaV4Z62ceRf01qr1FJMWt6xY8847iH4PTiY+jZOD Bz0aSBZjBShrPB4wQ+XDK8V1MQ9/IMRWPHaIc= MIME-Version: 1.0 Received: by 10.229.94.130 with SMTP id z2mr2449414qcm.71.1235759118058; Fri, 27 Feb 2009 10:25:18 -0800 (PST) Date: Fri, 27 Feb 2009 15:25:17 -0300 Message-ID: To: PHP Developers Mailing List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Memory Leaks with Objects (no circular reference) From: igor.feghali@gmail.com (Igor Feghali) Hi, I am facing some memory leaks with php 5.1.6 that has been fixed in 5.2.0. So I suppose the fix should be somewhere between those versions, but I couldn't find exactly which line in the NEWS file is that. Output for 5.1.6: --- 9 --- 44712 44784 44848 44912 44976 --- 8 --- 45008 45008 45008 45008 45008 Conclusion: memory consumption keeps constant for the class with 8 properties. unset() doesnt frees all the memory up for the class with 9 properties. Output for 5.2.0: --- 9 --- 66784 66828 66828 66828 66828 --- 8 --- 66896 66896 66896 66896 66896 Conclusion: memory consumption constant along the whole code, as expected. I have seen that reported many times in the bugs system, but in all the cases it ended up being something related to circular references which is not the case here. Some people also reported that replacing "unset($obj)" with "$obj = null" would help but I tried it and the problem remains. Any help on how to workaround that in userland would be very appreciated. Surely upgrading will fix that, but I am trying to keep compatibility with prior versions as much as possible. Best, ~IF.