Re: circular crash testcase

From: Date: Tue, 15 Aug 2000 04:22:04 +0000
Subject: Re: circular crash testcase
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-28879@lists.php.net to get a copy of this message
At 02:52 AM 8/15/00 +0200, waldschrott wrote:
I just commited a patch which hopefully closes all of these bugs. Note that your example leaks now like it should in a reference counting environment. It is of course cleaned up at the end of the request. I hope I didn't break anything with this patch. Such patches tend to propogate to weird places to please test it.
yep, it works, just tested thus is stas´ beloved sentence ('PHP doesn´t support circular references') outdated or how do I have to understand it. forgive my incompetence, but what does it mean for me that "it leaks now like it should in a ref-count env", does zend create a temporary copy of that object on access or... ?
Stas is right in certain contexts but it really depends what you are doing. In any way, what happens with circular references is that you end up having a circle point at itself, when the Zend Engine frees this, one of the memory blocks still has a reference count although nothing is really pointing at it anymore. This is how languages which have reference counting work. Perl uses the same kind of reference counting and I assume they have something similar. Not to have such a situation involves in writing a full fledged garbage collector like in Java. I don't think we want to see a garbage collector in PHP. It kind of sucks. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.dev (#28879) next »