WyriHaximus / reactphp-child-process-messenger

MIT License
31 stars 14 forks source link

Cleanup circular reference between $server and event listener #113

Closed lucasnetau closed 1 year ago

lucasnetau commented 1 year ago

While tracking down memory growth on a long running process using ReactPHP Filesystem I came across the following circular reference that needs to be cleaned up by the GC.

Circular reference between $server and the connection event listener causes garbage collection cycles when resolving.

I've additionally added removing listeners on all instances of closing the server, tests coverage is only for the success route.