I have few activities that make use of sqlite database, there is use of Cursors of course but in every method where I use cursors I close them consistently . . .
well even I do the closing of the cursors still I get this message
I/dalvikvm( 5232): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:631)
I/dalvikvm( 5232): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 5232): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 5232): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@467ed108 on my_table_name that has not been deactivated or closed
What exactly is my problem ? how can I find where is the bug in my code ? should “(SQLiteCursor.java:631)” mean something to me ?
Thanks
No, but this one
could help you figure out which one is the one that has not been closed properly. You can log the cursor’s reference and you will get a similar string as above, e.g.: