Android Content Provider database leak issue
Posted
by MattC
on Stack Overflow
See other posts from Stack Overflow
or by MattC
Published on 2009-09-04T13:18:20Z
Indexed on
2010/03/15
22:09 UTC
Read the original article
Hit count: 291
I am writing a content provider for this application and in my content provider I am opening a database connection, running a query and returning the cursor of results to the calling program. If I close this database connection in the provider, the cursor has no results. If I leave it open, I get "leak found" errors in my DDMS log. What am I missing here? What's the clean, proper way to return a cursor of database results?
© Stack Overflow or respective owner