> I would like to know like is the management, that recourses the php
utlize.
> I am making a work to university and I need of  more information.
> I find in www.zend.com a article about Reference Counting, but i stayed
> confuse, if o recourse is of PHP 4 or of
> ZEND Engine..

Deep inside of PHP4 dealing with issues like memory management and parsing
and whatnot is the Zend Engine.

Thus, for this question, the distinction between PHP and the Zend engine is
meaningless.

Here is a gross simplification of how it works:

PHP does reference counting which basically means that for any "chunk" of
data, PHP "knows" how many variables are looking at it.  Any time a new
variable is created to "look" at the same "chunk", that chunk's count goes
up by 1.  Any time a variable is changed to "look" at some other chunk, or
at nothing, the original chunk's count goes down by 1.

If a chunk's count hits 0, there ain't nobody left looking at that chunk, so
that memory can safely be re-used for something else.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General 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]

Reply via email to