closing SQLite

Hello!

According to this tutorial:
http://www.coronalabs.com/blog/2012/04/03/tutorial-database-access-in-corona/

The part where I must to close the database:

“Runtime:addEventListener( “system”, onSystemEvent )”

where I must to place this listener?
For example: user can exit from app from any scene and db must to be closed. Is that means that I have to implement this listener in all of my scenes? [import]uid: 106224 topic_id: 31418 reply_id: 331418[/import]

A Runtime event listener won’t be removed until you explicitly cancel it… even if you are switching scenes. That being the case you only need(and want to) have that line run once. [import]uid: 147305 topic_id: 31418 reply_id: 125587[/import]

A Runtime event listener won’t be removed until you explicitly cancel it… even if you are switching scenes. That being the case you only need(and want to) have that line run once. [import]uid: 147305 topic_id: 31418 reply_id: 125587[/import]