Finalizing a Cursor that has not been deactivated or closed non-fatal error

前端 未结 9 1464
慢半拍i
慢半拍i 2020-12-07 19:27

i\'m getting a \"Finalizing a Cursor that has not been deactivated or closed\" error on this piece of code. The code is used to fill a listview.

Since it\'s a non

9条回答
  •  -上瘾入骨i
    2020-12-07 19:34

    You should not be getting that message if you close the Cursor in onStop() or onDestroy(). Please try that again. Or, call startManagingCursor() after you get the Cursor from your query, and Android will close the Cursor on its own.

提交回复
热议问题