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

Use finalizers to automatically dispose databases and statements #96

Open
simolus3 opened this issue May 11, 2022 · 0 comments
Open

Use finalizers to automatically dispose databases and statements #96

simolus3 opened this issue May 11, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@simolus3
Copy link
Owner

In Dart 2.17, we can attach a Finalizer to objects to invoke a callback when they become unreachable. We can use this to automatically dispose databases and prepared statements if a user forgets to dispose them manually.

One issue is that the finalizer callback can't use the database itself, it would have to use a finalization token still providing all the information necessary to fully dispose the object.

@simolus3 simolus3 added the enhancement New feature or request label May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
@simolus3 and others