Commit cd49a6b
committed
Drop libsql::Database on close() to release file locks
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().1 parent 57b39a6 commit cd49a6b
1 file changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| |||
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
324 | | - | |
| 325 | + | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| |||
493 | 494 | | |
494 | 495 | | |
495 | 496 | | |
496 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
497 | 502 | | |
498 | 503 | | |
499 | 504 | | |
| |||
526 | 531 | | |
527 | 532 | | |
528 | 533 | | |
529 | | - | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
530 | 545 | | |
531 | 546 | | |
532 | 547 | | |
| |||
552 | 567 | | |
553 | 568 | | |
554 | 569 | | |
| 570 | + | |
555 | 571 | | |
556 | 572 | | |
557 | 573 | | |
| |||
0 commit comments