<?php
    
class Foo {
        function 
__construct()
        {
            
$this->bar = new Bar($this);
        }

        
/*
        function __destruct()
        {
            unset($this->bar);
        }
        */
    
}

    class 
Bar {
        function 
__construct($foo null)
        {
            
$this->foo $foo;
        }
    }

while (
true) {
    
$foo = new Foo();
    
//$foo->__destruct();
    
unset($foo);
    echo 
number_format(memory_get_usage()) . "\n";
}
?>