There is no leaked database connection with Content Providers.

What happens is, the database is kept open as long as the application process is alive, and is open just once, too.

When/if the process is killed, the OS kernel closes the file.

As far as that extra file being kept open - many (most?) OSs keep executable files open while their code is executing. One more shouldn't ruin anything. On the other hand, not having to reopen the database makes for better performance.

-- Kostya

29.03.2011 17:55, Scott McCormack пишет:
Based on this discussion, I've decided to use a content provider for access to 
an internal private database for my app. It simply makes the data access 
simpler for me, and there's a really nice go-by in the NotePad sample. However, 
I'm worried about your comment about the leaked database connection. I'm still 
new to this arena. What are the consequences of leaking the database connection?



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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

Reply via email to