Android Question Can we close all cursors by closing database?

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi,

I have forgotten to close cursors at many places.There is a refresh data functionality in which I delete SQLite database.It downloads again on next login.

The problem is many a times on refreshing (deleting database) it gives error related to SQLite database.Could it be because of open cursors.

So instead of closing each cursor can I close SQL in each activity which will close all open cursors in that activity or I need to close all individual cursors.

Please guide me.

Thanks
Juzer
 

Juzer Hussain

Active Member
Licensed User
Longtime User
Ok Erel,
After doing that If I just close the SQL Object will it be enough or I will have to close each cursor also?
 
Upvote 0
Top