Android Finalizing a Cursor that has not been deactivated or closed

问题描述:

使用Sqlite数据库时,有时候会报下面的异常:

Finalizing a Cursor that has not been deactivated or closed

一个光标没有被停用或者关闭。

解决方法:

在使用Cursor对象前,调用startManagingCursor()方法,让Activity基于本身的生命周期,来管理Cursor的生命周期。

posted @   星辰之力  阅读(287)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示