07.04.2011 21:39, Nathan ?????:
As has been noted in these forums, a ContentProvider*never*  closes a
database because is there is no call on its interface to do so.

The Linux kernel closes open files when/if the process is killed or crashes, just like it cleans up other stuff.

SQLite, as noted by its primary developer, does not corrupt the DB when this happens. I've previously posted a link to where he says that.

I
haven't been using contentproviders but this seems bad, and will
definitely leave red messages in your log.

There are no red messages about this in the log at the time the process is terminated.

There are logcat warnings if a SQLiteCursor is left open and unreferenced, so it's GC'd while still open.

I suppose this can happen with SQLiteDatabase objects as well. That would also be a genuine leak of the native data structures allocated by SQLite library, but that'd be a bug in application code, and won't happen at process termination time, but much sooner.

-- Kostya

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to