If they end up in a circular reference (in this particular case they do, they usually don't) then you're leaking memory.
Zeev At 12:10 AM 6/11/2002, brad lafountain wrote: >I use parent members all the time.. w/zend1 > > - Brad >--- Markus Fischer <[EMAIL PROTECTED]> wrote: > > Hi, > > > > that's a limitation of the Zend Engine. It does not support > > circular references (at least this is would Zeev told me last > > time :) > > > > - Markus > > > > On Mon, Jun 10, 2002 at 10:25:38PM +0200, Andre Christ wrote : > > > 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 ? > > > > -- > > GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc > > > > -- > > PHP Development Mailing List <http://www.php.net/> > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > >__________________________________________________ >Do You Yahoo!? >Yahoo! - Official partner of 2002 FIFA World Cup >http://fifaworldcup.yahoo.com > >-- >PHP Development Mailing List <http://www.php.net/> >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php