Skip to content

Delete web sqlite database from Dart #2821

Answered by simolus3
davidmartos96 asked this question in Q&A
Discussion options

You must be logged in to vote

The problem is that even if drfitDb.close() is called, the shared worker still holds the native db connection. Is there any way to close it also in the worker?

I've implemented this in 09c6cf0, but it also requires a newer worker. It's not 100% reliable (if a second tab opens a database connection and gets closed, it can't tell the database server that the connection is dead). But the common case of opening a database, closing it and then deleting it should work.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@davidmartos96
Comment options

@davidmartos96
Comment options

@davidmartos96
Comment options

@simolus3
Comment options

Answer selected by davidmartos96
@davidmartos96
Comment options

@simolus3
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants