Skip to content

Commit

Permalink
Merge pull request #41 from PhiloNL/patch-1
Browse files Browse the repository at this point in the history
Fix memory leak when using Laravel Octane
  • Loading branch information
aarondfrancis authored Dec 9, 2022
2 parents e69530e + b76c2eb commit 3c7d670
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Middleware/RenderTorchlight.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ public function handle(Request $request, Closure $next)
return $response;
}

return BladeManager::renderResponse($response);
$response = BladeManager::renderResponse($response);

// Clear blocks from memory to prevent memory leak when using Laravel Octane
BladeManager::clearBlocks();

return $response;
}

protected function handleLivewireRequest(JsonResponse $response)
Expand Down

0 comments on commit 3c7d670

Please sign in to comment.