It's up to you. If you don't use managed cursors, you will have to close/query them yourself when the activity is destroyed/created/stopped, etc.
On Tue, Feb 10, 2009 at 4:14 PM, Spiros <[email protected]> wrote: > > Hi, > > I'm using an autocomplete box, with suggestions provided by a > SimpleQueryAdapter, almost identical to the code in this thread: > > http://groups.google.com/group/android-developers/browse_thread/thread/8e9738ec79042f9e > Not sure if relevant, but only difference I see is that, both in the > adapter constructor, as well as in runQuery(), I use a cursor returned > by SQLiteDatabase#query() obtained via an SQLiteOpenHelper instance. > > Should I be using Activity#startManagingCursor() on these cursors or > not? > > If I don't use managed cursors, then I get "leak found" warnings > ("database was created [sic] but never closed"). > > If I do then, if the application pauses (e.g., incoming call) and then > resumes, I get an unhandled exception ("attempted to requery closed > cursor" thrown by Activity#performRestart(), in Activity.java:3333 -- > SDK 1.0_r2, btw). > > What am I missing? > > Thanks! > Spiros > > > -- Romain Guy Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

