Skip to content

Commit

Permalink
frankenphp-symfony: call gc_collect_cycles() after handling request
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Oct 30, 2023
1 parent b5f4e09 commit e08a151
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/frankenphp-symfony/src/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
*/
class Runner implements RunnerInterface
{
private HttpKernelInterface $kernel;

public function __construct(HttpKernelInterface $kernel)
public function __construct(private HttpKernelInterface $kernel)
{
$this->kernel = $kernel;
}

public function run(): int
Expand All @@ -40,6 +37,8 @@ public function run(): int
if ($this->kernel instanceof TerminableInterface && $sfRequest && $sfResponse) {
$this->kernel->terminate($sfRequest, $sfResponse);
}

gc_collect_cycles();
} while ($ret);

return 0;
Expand Down

0 comments on commit e08a151

Please # to comment.