note 92703 deleted from function.gc-enable by danbrown
| From: | danbrown@php.net | Date: | Tue, 04 Aug 2009 18:49:32 +0000 |
| Subject: | note 92703 deleted from function.gc-enable by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-159107@lists.php.net to get a copy of this message | ||
Note Submitter: jake at example dot com
----
Ignore the comment by Anonymous on 08-Apr-2009 03:43, it is completely fictionalized. Garbage
collection with cycles is all about detecting cyclic references for collection which would otherwise
be missed by reference counting.
If you had something like:
<?php
class Child {
public $parent;
}
class Parent {
public $child;
}
?>
If a Child instance and Parent instance point to each other, they would never be collected without
cycle detection even if no other references to them existed. These gc_* functions are to allow
detection and collection of structures like this.