Should I close SQLite database manually in Electron.js app before quit?

Viewed 114

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?

0 Answers
Related