How to solve database error like database and cursor not close properly
hi all members thanks in advance.
when i run my Database application in logcat show the error like:
database and cursor not close properly
a开发者_JAVA技巧pplication is not crash but sometime it creates a problem in device how can i get rid of this error? it always happen when i run any database application.
Close the cursor if exists after your code execution done (in finally
statements)
finally {
if (cursor != null) {
cursor.close();
}
}
Thanks Deepak
always close the cursor using cursor.close()
精彩评论