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

Support explicitly closing a connection #55

Closed
jraymakers opened this issue Dec 10, 2024 · 3 comments
Closed

Support explicitly closing a connection #55

jraymakers opened this issue Dec 10, 2024 · 3 comments
Assignees

Comments

@jraymakers
Copy link
Contributor

The explicit close method got removed when automatic memory management was added. But it can be useful to be able to explicitly close a connection.

A challenge is preventing the automatic memory management from double-freeing the connection after it is explicitly closed. To do this, we'll likely need to change the connection External to be a wrapper around the underlying connection pointer, so the underlying pointer can be cleared when it is explicitly freed.

@freakynit
Copy link
Contributor

+1 for this.

When a developer knows for sure they don't need the connection anymore, allow them to close it.
Automated stuff is nice, but it shouldn't take away the explicit ability.

@recoye
Copy link

recoye commented Dec 23, 2024

+1 for this.

@jraymakers
Copy link
Contributor Author

This has been implemented in 1.1.3-alpha.8. Happy holidays! 🎉

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

No branches or pull requests

3 participants