5

LogCat keeps on showing me a

Cursor finalized without prior close()

warning.

I was using SQLite on a previous version of the app, but don't use it anymore.

I tried to find the cause for this warning with no luck. some Google and Stackoverflow references say it's related to the db.

What does this warning mean? should I ignore it?

I could supply a sample code but I don't have an idea which part of my app causes this. there is also no stack trace added.

EDIT: Apparently a cursor is being used by a 3rd party dependency that I'm using, which is causing this warning.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
Omri374
  • 2,555
  • 3
  • 26
  • 40
  • 1
    there is a cursor that is dereferenced (and therefore collected by the garbage collector) but that you never `close()` before dereferencing. Hence the warning. Most of the time, I consider it is quite safe to ignore it, and quite a pain to track it down. – njzk2 Mar 12 '14 at 14:54
  • See http://stackoverflow.com/a/29846562/262789 for how to resolve. – Jade Jan 23 '17 at 15:40

1 Answers1

6

Exactly what your warning says, you have some cases that you didn't use

cursor.close();
Barışcan Kayaoğlu
  • 1,294
  • 3
  • 14
  • 35