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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to