You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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
Beta Was this translation helpful? Give feedback.
All reactions