Re: PHP 4.0 Bug #2430 Updated: memory leaks in zend

From: Date: Tue, 05 Oct 1999 20:14:07 +0000
Subject: Re: PHP 4.0 Bug #2430 Updated: memory leaks in zend
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-11558@lists.php.net to get a copy of this message
Nothing has changed (fresh build from CVS, 10 minutes ago): zend_hash.c(190) : Freeing 0x081682A8 (4 bytes), script=tclass.php3 Last leak repeated 3 times zend_hash.c(180) : Freeing 0x08168248 (45 bytes), script=tclass.php3 Last leak repeated 3 times zend_hash.c(100) : Freeing 0x08168038 (20 bytes), script=tclass.php3 zend_execute.c(1492) : Freeing 0x08167FD8 (44 bytes), script=tclass.php3 zend_variables.c(142) : Actual location (location was relayed) zend_execute.c(1490) : Freeing 0x08167F98 (12 bytes), script=tclass.php3 This is the script (test/classes/class_example.php3t) : <?php /* pretty nifty object oriented code! */ class user { var $first_name,$family_name,$address,$phone_num; cfunction display() { echo "User information\n"; echo "----------------\n\n"; echo "First name:\t ".$this->first_name."\n"; echo "Family name:\t ".$this->family_name."\n"; echo "Address:\t ".$this->address."\n"; echo "Phone:\t\t ".$this->phone_num."\n"; echo "\n\n"; } cfunction initialize($first_name,$family_name,$address,$phone_num) { $this->first_name = $first_name; $this->family_name = $family_name; $this->address = $address; $this->phone_num = $phone_num; } }; function test($u) { /* one can pass classes as arguments */ $u->display(); $t = $u; $t->address = "New address..."; return $t; /* and also return them as return values */ } $user1 = new user; $user2 = new user; $user1->initialize("Zeev","Suraski","Ben Gourion 3, Kiryat Bialik, Israel","+972-4-8713139"); $user2->initialize("Andi","Gutmans","Haifa, Israel","+972-4-8231621"); $user1->display(); $user2->display(); $tmp = test($user2); $tmp->display(); ?> Sorry for the delay but I had trouble building php4 since the libtoolizing. I have not been able to build with informix yet since, but it now works again on RH 6.0 without Informix. Danny. --- Bug Database wrote: > > ID: 2430 > Updated by: andi > Reported By: Danny.Heijl@cevi.be > Status: Open > Bug Type: Scripting Engine problem > Assigned To: > Comments: > > Can you please see if those memory leaks have gone away from you after updating libzend. > > Full Bug description available at: > http://bugs.php.net/version4/?id=2430

« previous php.dev (#11558) next »