It sounds to me that weak/soft references are only really half a solution to a problem.

As Chris Stockton points out http://news.php.net/php.internals/54391 there is always going to be additional code that has to check to see if the reference is still valid.

If the only concern here is running out of memory, surely you could design a framework that could reduce it's memory usage without having to get rid of it's objects.

For example, your ORM objects will have a store of data. You could run a process every now and again that deletes the data from the objects (everything except the ID of the table). And then write it in to the framework so that if you start using the object again it goes and gets it's data back?


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

Reply via email to