Skip to content

Commit

Permalink
Call db.close() in ds.remove_database()
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Feb 6, 2025
1 parent f95ac19 commit 7f23411
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions datasette/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ def add_memory_database(self, memory_name):
return self.add_database(Database(self, memory_name=memory_name))

def remove_database(self, name):
self.get_database(name).close()
new_databases = self.databases.copy()
new_databases.pop(name)
self.databases = new_databases
Expand Down

0 comments on commit 7f23411

Please sign in to comment.