[PHP-DEV] Memory Leaks /w nested classes
Hi, working with php's oop implementation I got some memory leaks. The behaviour can be reproduced with the following script: ?php class CBar { var $Parent; } class CSuper { function CSuper() { $this-Bar = new CBar(); $this-Bar-Parent = $this; } } $Super = new CSuper(); ? php 4.2.1 --enable-debug zend_hash.c(260) : Freeing 0x0821000C (39 bytes), script=/home/ach/usr/htdocs/devel/oop.php Last leak repeated 1 time ./zend_execute.c(470) : Freeing 0x0820FFAC (44 bytes), script=/home/ach/usr/htdocs/devel/oop.php zend_variables.c(126) : Actual location (location was relayed) ./zend_execute.c(467) : Freeing 0x0820FF6C (12 bytes), script=/home/ach/usr/htdocs/devel/oop.php zend_API.c(596) : Freeing 0x0820FE54 (44 bytes), script=/home/ach/usr/htdocs/devel/oop.php zend_API.c(584) : Actual location (location was relayed) zend_hash.c(176) : Freeing 0x0820FB34 (32 bytes), script=/home/ach/usr/htdocs/devel/oop.php Last leak repeated 1 time ./zend_execute.c(1948) : Freeing 0x0820F844 (12 bytes), script=/home/ach/usr/htdocs/devel/oop.php Is there anything wrong with the code or is it a bug in php / Zend ? Greets, André -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Memory Leaks /w nested classes
Hi, working with php's oop implementation I got some memory leaks. The behaviour can be reproduced with the following script: ?php class CBar { var $Parent; } class CSuper { function CSuper() { $this-Bar = new CBar(); $this-Bar-Parent = $this; } } $Super = new CSuper(); ? php 4.2.1 --enable-debug zend_hash.c(260) : Freeing 0x0821000C (39 bytes), script=/home/ach/usr/htdocs/devel/oop.php Last leak repeated 1 time ./zend_execute.c(470) : Freeing 0x0820FFAC (44 bytes), script=/home/ach/usr/htdocs/devel/oop.php zend_variables.c(126) : Actual location (location was relayed) ./zend_execute.c(467) : Freeing 0x0820FF6C (12 bytes), script=/home/ach/usr/htdocs/devel/oop.php zend_API.c(596) : Freeing 0x0820FE54 (44 bytes), script=/home/ach/usr/htdocs/devel/oop.php zend_API.c(584) : Actual location (location was relayed) zend_hash.c(176) : Freeing 0x0820FB34 (32 bytes), script=/home/ach/usr/htdocs/devel/oop.php Last leak repeated 1 time ./zend_execute.c(1948) : Freeing 0x0820F844 (12 bytes), script=/home/ach/usr/htdocs/devel/oop.php Is there anything wrong with the code or is it a bug in php / Zend ? Greets, André -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Memory Leaks /w nested classes
Hi Brad, Brad Lafountain [EMAIL PROTECTED] wrote I use parent members all the time.. w/zend1 well, that's what I wanted to do until I discovered these entrys in my log file when php is compiled --enable-debug. Do you have these mem leaks as well ? Greets, André -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] new class as Parameter
Hi, I'd like to know if the following piece of code is compatible with php 4.0.0 higher: ?php function myFunction($class) { [...] } class myClass { [...] } myFunction(new myClass); ? Are there any bugs known of you pass new Class directly ? Thanks in advance, André -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Possibility of moving bugs to another list?
Hi, I am sure I am probably rehashing an old issue that I wasn't around for, but I have noticed that it has been incredibly hard to follow php-dev (especially lately since I haven't had as much free time as I normally do). When of the things I noticed is that I commonly miss a php-dev post because of all the bug mailings. I did set up a filter in my mail client; however, IMO , if everyone is having to use a mail filter, wouldn't it be more logical to create a php-bugs list? What do you guys think? I'd vote for that, as development discussions will get closer to the readers focus. Andre -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] In C, how do I access an associative array?
Hi, How do I find all the keys and values out of that array in my extension? Is there a way? Have a look at the Zend API Documentation at http://www.zend.com/apidoc/ or review implementations of other Extensions. Greets, Andre -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] 4.0.6 BUG with GCC 3.0.1
Hi, Indeed, binaries (including libs) compiled with gcc 3.x aren't compatible to binaries compiled with gcc 2.95. The behaviour you discovered cannot be classified a php bug, it is rather a limitation of the new compiler version. I was under the impression that while your statement is true for libraries containing C++ code, the C ABI has not changed. Am I wrong? Well, I'd like to review an article in the latest IX before I can judge about that ... Andre -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] 4.0.6 BUG with GCC 3.0.1
Hi, Where can I get the source or binaries for 4.07? I think I've discovered a bug , but want to make sure with latest build. The bug has to do with Gnu GCC 3.0.1 libraries. It's incompatible! Trust me it is! And I even tried to trick PHP by creating a symbolic link referring to the older libraries, no such luck! Indeed, binaries (including libs) compiled with gcc 3.x aren't compatible to binaries compiled with gcc 2.95. The behaviour you discovered cannot be classified a php bug, it is rather a limitation of the new compiler version. Greets, André -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] SID without cookies - why sometimes automatic?
Hi, Is there perhaps some configuration I can change on the web server? I obviously prefer the way the development machine works because it saves me having to go through every link adding SID, but my main priority is just to get both machines to work the same. I'm not sure wether this topic belongs to the php-dev list ... Anyways, there is a configuration directive in php.ini: session.use_trans_sid = 1 ; use transient sid support if enabled ; by compiling with --enable-trans-sid If use_trans_sid is active, the session id is appended to links automatically. Caution: It has a remarkable impact on speed if the processed page has a lot of links. Greets, Andre -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]