1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/Zend/tests/bug78589.phpt
Nikita Popov 73115ef873 Fixed bug #78589
Don't protect GC while destroying zvals. We may need to add GC
roots during this phase.
2019-09-24 12:17:21 +02:00

20 lines
271 B
PHP

--TEST--
Bug #78589: Memory leak with GC + __destruct()
--FILE--
<?php
class Test {
public function __destruct() {}
}
$test = new Test;
$test->foo = [&$test->foo];
$ary = [&$ary, $test];
unset($ary, $test);
gc_collect_cycles();
?>
===DONE===
--EXPECT--
===DONE===