Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.x] Add ability to flush state on Vite helper #55228

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

timacdonald
Copy link
Member

@timacdonald timacdonald commented Mar 31, 2025

There is a memory leak in Octane as the Vite class is a singleton which collects state on each request.

We cannot make the class a scoped instance, as it needs to store some registered information between requests.

This PR adds a flush method that we will then call in Octane to clear the state between executions.

Octane PR: https://github.com/laravel/octane/pull/1016/files#diff-713c2b10a1e78ad1a57b948bbecdeace4afcef924eef6ce3c0899d2fa2fe7134L51-R52

@taylorotwell taylorotwell merged commit d315745 into laravel:12.x Apr 1, 2025
41 checks passed
@timacdonald timacdonald deleted the vite-flush branch April 1, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants