Re: Re: [RFC] Magic Method that handles unset($object)
| From: | Ants Aasma | Date: | Sun, 10 Dec 2006 23:29:23 +0000 |
| Subject: | Re: Re: [RFC] Magic Method that handles unset($object) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-26893@lists.php.net to get a copy of this message | ||
Arnold Daniels wrote:
Another way to solve this problem is to look for circular references upon unset. This might be bad for performance, but I believe that preventing a memory leak is something that is the responsibility of PHP, not of the user. That would indeed be too slow. The standard way to handle this, is to only check visibility periodically. That is how Java, .NET, Python and countless others do that. Check http://www.hpl.hp.com/personal/Hans_Boehm/gc/ for a sample of how an implementation might look like.Ants