- Updated swoole/phpx from ~2.6.0 to ~2.6.1 in composer.json - Incremented version number in version.txt from 1108 to 1109 - Bumped package version constant in Translator.php from 0.6.0 to 0.6.1 - Added new test file for request root shutdown cleanup functionalitymaster
parent
0d0e62fbc7
commit
729000fa0c
4 changed files with 41 additions and 3 deletions
@ -0,0 +1,38 @@ |
||||
--TEST-- |
||||
request shutdown releases compiled globals, static properties and closure cycles |
||||
--FILE-- |
||||
<?php |
||||
|
||||
class RequestRootNode |
||||
{ |
||||
public ?RequestRootNode $next = null; |
||||
} |
||||
|
||||
class RequestRootCache |
||||
{ |
||||
public static array $objects = []; |
||||
public static ?Closure $callback = null; |
||||
} |
||||
|
||||
function main(): void |
||||
{ |
||||
global $requestRootObjects; |
||||
|
||||
$first = new RequestRootNode(); |
||||
$second = new RequestRootNode(); |
||||
$first->next = $second; |
||||
$second->next = $first; |
||||
|
||||
$requestRootObjects = [$first, $second]; |
||||
RequestRootCache::$objects = [$first, $second]; |
||||
|
||||
$callback = null; |
||||
$callback = static function () use (&$callback): void { |
||||
}; |
||||
RequestRootCache::$callback = $callback; |
||||
|
||||
echo "done\n"; |
||||
} |
||||
?> |
||||
--EXPECT-- |
||||
done |
||||
@ -1 +1 @@ |
||||
1108 |
||||
1109 |
||||
Loading…
Reference in new issue