Do I need to be concerned about making sure the database is closed when a FragmentActivity that uses a LoaderEx SQLiteCursorLoader is paused or destroyed?
Thanks much
Do I need to be concerned about making sure the database is closed when
Share
When the
FragmentActivityis destroyed, it should callreset()on allLoaderinstances it created, which will callonReset()in theLoaderimplementation, which inSQLiteCursorLoadercallsclose()on any outstandingCursor.Note that this happens when the activity is destroyed. There does not seem to be a
Loaderequivalent of the managedCursorconcept of deactivating theCursorwhen the activity is paused. That’s a pity, as that was a nice heap management feature, and I’ll ponder how to best support that.If you find evidence that something is being leaked, file an issue in the LoaderEx project with details of how to reproduce the error.