ID: 25541
Updated by: [EMAIL PROTECTED]
Reported By: ich at christoph-emonds dot de
Status: Verified
Bug Type: Zend Engine 2 problem
Operating System: *
-PHP Version: 5CVS-2003-11-29
+PHP Version: 5CVS-2004-01-11
New Comment:
Construct A!Construct B!
/usr/src/web/php/php5/Zend/zend_hash.c(301) : Freeing 0x40E4B9F4 (41
bytes), script=t.php
Last leak repeated 1 time
/usr/src/web/php/php5/Zend/zend_execute.c(3095) : Freeing 0x40E4B7D4
(44 bytes), script=t.php
/usr/src/web/php/php5/Zend/zend_API.c(720) : Actual location (location
was relayed)
Last leak repeated 1 time
/usr/src/web/php/php5/Zend/zend_objects.c(88) : Freeing 0x40E4B790 (12
bytes), script=t.php
Last leak repeated 1 time
/usr/src/web/php/php5/Zend/zend_execute.c(3094) : Freeing 0x40E4B74C
(16 bytes), script=t.php
Last leak repeated 1 time
/usr/src/web/php/php5/Zend/zend_API.c(721) : Freeing 0x40E4B3EC (32
bytes), script=t.php
/usr/src/web/php/php5/Zend/zend_hash.c(157) : Actual location (location
was relayed)
Last leak repeated 1 time
=== Total 10 memory leaks detected ===
Previous Comments:
------------------------------------------------------------------------
[2003-11-18 16:54:47] [EMAIL PROTECTED]
Construct A!
Construct B!
/usr/src/web/php/php5/Zend/zend_hash.c(236) : Freeing 0x40E45A98 (41
bytes), script=t.php
Last leak repeated 1 time
/usr/src/web/php/php5/Zend/zend_execute.c(3098) : Freeing 0x40E45A34
(44 bytes), script=t.php
/usr/src/web/php/php5/Zend/zend_API.c(713) : Actual location (location
was relayed)
Last leak repeated 1 time
/usr/src/web/php/php5/Zend/zend_objects.c(106) : Freeing 0x40E459F0
(12 bytes), script=t.php
Last leak repeated 1 time
/usr/src/web/php/php5/Zend/zend_execute.c(3097) : Freeing 0x40E459AC
(16 bytes), script=t.php
Last leak repeated 1 time
/usr/src/web/php/php5/Zend/zend_API.c(714) : Freeing 0x40E455E8 (32
bytes), script=t.php
/usr/src/web/php/php5/Zend/zend_hash.c(157) : Actual location (location
was relayed)
Last leak repeated 1 time
=== Total 10 memory leaks detected ===
------------------------------------------------------------------------
[2003-09-15 06:35:27] ich at christoph-emonds dot de
Description:
------------
If you create two objects which contain a reference to the
other object, none of both __destruct() functions will be
called.
Configure: './configure' '--with-mysql' '--with-xsl'
'--with-sqlite' '--enable-sockets' '--with-mysql-sock'
'--with-gd' '--with-dom' '--with-apxs2=/usr/sbin/apxs2'
'--with-zlib'
Reproduce code:
---------------
class A {
function __construct() {
print "Construct A!";
$this->other = new B( $this );
}
function __destruct() {
print "Destruct A!";
}
}
class B {
function __construct( A $obj ) {
print "Construct B!";
$this->other = $obj;
}
function __destruct() {
print "Destruct B!";
}
}
new A();
Expected result:
----------------
Construct A!Construct B!Destruct A!Destruct B!
Actual result:
--------------
Construct A!Construct B!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25541&edit=1