Skip to content

Drop libsql::Database on close() to release file locks#213

Merged
penberg merged 1 commit intomainfrom
fix-database-close
Mar 18, 2026
Merged

Drop libsql::Database on close() to release file locks#213
penberg merged 1 commit intomainfrom
fix-database-close

Conversation

@penberg
Copy link
Copy Markdown
Contributor

@penberg penberg commented Mar 18, 2026

Make db field Optional so close() can set it to None, which drops the libsql::Database and releases underlying file handles immediately. Previously only the connection was dropped, leaving the database object alive until GC — causing EBUSY on Windows when trying to delete the database file right after close().

Make db field Optional so close() can set it to None, which drops the
libsql::Database and releases underlying file handles immediately.
Previously only the connection was dropped, leaving the database object
alive until GC — causing EBUSY on Windows when trying to delete the
database file right after close().
@penberg penberg merged commit 99ff1f9 into main Mar 18, 2026
16 checks passed
@penberg penberg deleted the fix-database-close branch March 18, 2026 13:06
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.

1 participant