Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36897 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56532 invoked from network); 9 Apr 2008 08:15:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2008 08:15:12 -0000 Authentication-Results: pb1.pair.com header.from=php-dev.list@daevel.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php-dev.list@daevel.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain daevel.net designates 80.248.217.131 as permitted sender) X-PHP-List-Original-Sender: php-dev.list@daevel.net X-Host-Fingerprint: 80.248.217.131 carthago.dv.daevel.fr Linux 2.6 Received: from [80.248.217.131] ([80.248.217.131:56650] helo=carthago.dv.daevel.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/CE-04949-C0B7CF74 for ; Wed, 09 Apr 2008 04:15:12 -0400 Received: from [89.159.30.121] (helo=[192.168.1.3]) by carthago.dv.daevel.fr with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JjVST-0006xR-1D for internals@lists.php.net; Wed, 09 Apr 2008 10:15:05 +0200 Message-ID: <47FC7B00.5040403@daevel.net> Date: Wed, 09 Apr 2008 10:14:56 +0200 User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: destroy the current object (PDO) From: php-dev.list@daevel.net (Olivier Bonvalet) Hello, I would like to correct a little "problem" with : when an error occured in the constructor (a connection error for example) no object is returned. Internally, the object is created then destroyed (via "ZVAL_NULL(object);" statement). The problem is when the PDO class is derived and the error catched in the "child" constructor : $this is destroyed, but the object still exists in memory (and the __destruct will be called at the end of the script). Is there a way here to really destroy the object ? I submit a bug report (44669), but C. Rodriguez seems to don't agree with me. So I would like to correct the problem myself but... I can't :D I join here a better example of this behaviour :