mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
This is a follow-up on GH-17343 to implement GC cycle management. Previously the objects lived too long due to the strong cycle. This patch adds get_gc handlers to break the cycle. Closes GH-17355.
20 lines
323 B
PHP
20 lines
323 B
PHP
--TEST--
|
|
IntlIterator cycle management
|
|
--EXTENSIONS--
|
|
intl
|
|
--FILE--
|
|
<?php
|
|
function break_cycle_test() {
|
|
$obj = IntlCalendar::getKeywordValuesForLocale('calendar', 'fa_IR', true);
|
|
unset($obj);
|
|
var_dump(gc_collect_cycles());
|
|
}
|
|
break_cycle_test();
|
|
break_cycle_test();
|
|
break_cycle_test();
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|
|
int(1)
|
|
int(1)
|