Get reference count on a variable.
| From: | Robert Cummings | Date: | Sat, 21 Aug 2004 02:48:33 +0000 |
| Subject: | Get reference count on a variable. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-194383@lists.php.net to get a copy of this message | ||
Hi All,
I think I'm looking for something that doesn't exist, but just in
case thought I'd check the list. Does anyone know if a PHP function
exists to get the number of references on a given variable's data? I was
hoping to create a way for a factory to automatically recycle resources
without the need for the developer to call some kind of free() method.
If I could get the internal reference count then I'd be able to
determine if it is free by virtue of only 1 reference (the factory).
This is for PHP4 btw, the solution is trivial in PHP5 using destructors.
Thanks in advance.
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'