mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-26 20:14:47 +01:00
e2a6bcddae
Also fix memory leaks in general when closing without previous explicit stop
23 lines
351 B
PHP
23 lines
351 B
PHP
--TEST--
|
|
Check uv_async has no memory leak
|
|
--FILE--
|
|
<?php
|
|
$m = memory_get_usage();
|
|
|
|
$loop = uv_loop_new();
|
|
|
|
$async = uv_async_init($loop, static function ($async) {
|
|
uv_close($async);
|
|
});
|
|
uv_async_send($async);
|
|
|
|
unset($async);
|
|
|
|
uv_run($loop, UV::RUN_DEFAULT);
|
|
uv_loop_delete($loop);
|
|
unset($loop);
|
|
|
|
echo memory_get_usage() - $m, PHP_EOL;
|
|
--EXPECTF--
|
|
0
|