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

Fix a regression introduced by #411 #412

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Fix a regression introduced by #411 #412

merged 1 commit into from
Sep 13, 2024

Conversation

s-ludwig
Copy link
Member

Closing of the file stream must only be done when the last reference gets destroyed.

Note that this requires an API addition in eventcore, which is why the code has been wrapped in a static if.

Closing of the file stream must only be done when the last reference gets destroyed.

Note that this requires an API addition in eventcore, which is why the code has been wrapped in a static if.
s-ludwig added a commit to vibe-d/eventcore that referenced this pull request Sep 13, 2024
@l-kramer l-kramer merged commit 48bd2b0 into master Sep 13, 2024
13 checks passed
@l-kramer l-kramer deleted the file_hotfix branch September 13, 2024 09:06
s-ludwig added a commit that referenced this pull request Sep 13, 2024
The warning in its previous form was too general. It is only an actual problem if the last reference to a FileStream is leaked to the GC, as long as it is ensured that the file gets closed before the GC attempts to finalize the last copy, everything is safe.

See #412
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