Re: Re: Bug in current Object Model

From: Date: Wed, 13 Feb 2002 19:39:22 +0000
Subject: Re: Re: Bug in current Object Model
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-80027@lists.php.net to get a copy of this message
At 01:34 PM 2/13/2002 -0600, Jason Greene wrote:
Yes I do realize that the function would copy the value; however, I would think the output before and after $obj->do_something would be equal The problem I was mainly refering to is the reference count of the properties elements. Why would it grow from 2 to 3 after the call to $obj->do_somtehing? Why does the reference count of the object drop from 2 to 1 after the function is called? If I remove the line $obj->do_something I get the following. object(test)(1) refcount(2){ ["dummy"]=> long(1) refcount(2) } object(test)(1) refcount(2){ ["dummy"]=> long(1) refcount(2) } Perhaps I am missing something obvious?
I have a bit of a stack overflow right now but as there was some zval splitting going on this could have happened. In the end if there's no leak nor a crash it means the reference counting was most probably doing well. One of the main reasons for the new object model is such weird behavior. The new one is completely consistent. Andi

« previous php.dev (#80027) next »