Replies: 1 comment
|
love it |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi!
I'm still using hhvm <3.30 and i've a question about the GC.
` class TestL {
public $f;
function __destruct()
{
echo 'DIE'."\r\n";
}
}
function test()
{
$r = new TestL();
$l = new TestL();
$r->f = $l;
$l->f = $r;
}
while (1)
{
for ($i = 0; $i < 1000; $i++)
test();
gc_collect_cycles();
usleep(1);
}
`
Shouldn't this code trigger the GC and free up $l and $r ? The destructor never gets called,
Thank you
All reactions