Yes, the question was pointed in another way, the destructors are not called until the last reference to an object has been removed, but if you store a reference in an array so you lately return a reference to the already loaded instance instead of creating an aliasing of that instance, then you get the undesirable behavior that the object is never destroyed until the script ends, because there is always a reference in that array and you can not check when references are removed in any way.
And leaving the array growing while each object that exists in a huge database is slowly loaded and never unloaded, is not an option.
then dont store a reference to the object but instead just store the key in the array.
regards, Lukas
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php