When to close a SQLite database (using FMDB)

When should you close the connection to the SQLite database (using [db close] in FMDB)?

Now I close it after starting each batch of related requests, but should I close when my application closes? What are the pros and cons anyway?

thanks

+6
source share
1 answer

I am the guy who wrote FMDB.

Keep it open unless you change your layout. The only reason it closes and constantly reopens is to hit performance / battery life a bit.

+33
source

All Articles