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

Remove duplicated deinit defer for GPA #504

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

gerred
Copy link
Contributor

@gerred gerred commented Jun 8, 2022

Removes duplicated deinit on the allocator. Fixes #503.

@gerred
Copy link
Contributor Author

gerred commented Jun 8, 2022

Not sure there's a valuable test here that wouldn't make this PR an entirety of testing main.zig to prove there's not double de-inits on exit, which would require moving a bunch of stuff out of main. As such, I just tested this with a generated ZLS config and running ZLS for a bit. Seems like some sort of linter in the language server could deal with this issue if it can't be detected at compile time.

@SuperAuguste
Copy link
Member

Oops, my bad, I think I caused this problem while rebasing; thanks for the fix! Just gonna wait for the CI to pass and then I'll merge. :)

@SuperAuguste SuperAuguste merged commit 083dd5f into zigtools:master Jun 9, 2022
@gerred gerred deleted the remove-duped-deinits branch June 9, 2022 22:57
@gerred gerred restored the remove-duped-deinits branch June 9, 2022 22:58
@gerred gerred deleted the remove-duped-deinits branch June 9, 2022 22:59
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.

zls config memory leak? segfault at detectLeaksInBucket
2 participants