2

I cannot find any mention or code example anywhere. I'm developing an Electron.js app that uses SQLite npm module. User selects a database from a list and works with it. The database opens once (in renderer process) and keeps being opened until user clicks on "Close this database" button. But user can also quit the app by "Close" button on the top right corner of the window. Should I catch "close" event and call db.close() explicitly to avoid data corruption, or the database closes automatically in this case?

Sasha
  • 43
  • 3
  • Possible duplicate? [What if I don't close the database connection in Python SQLite](https://stackoverflow.com/questions/9561832/what-if-i-dont-close-the-database-connection-in-python-sqlite) This question is about Python, but SQLite is universal across languages. – Chris Aug 19 '20 at 18:35
  • 1
    It is not dupliquated, the behaviours between closing sqlite in electron app and python is different internally – Mahefa Jun 29 '21 at 11:44

0 Answers0