问题描述:
使用Sqlite数据库时,有时候会报下面的异常:
Finalizing a Cursor that has not been deactivated or closed。
一个光标没有被停用或者关闭。
解决方法:
在使用Cursor对象前,调用startManagingCursor()方法,让Activity基于本身的生命周期,来管理Cursor的生命周期。
Sqlite异常处理
本文介绍在使用Sqlite数据库过程中遇到的FinalizingaCursorthathasnotbeendeactivatedorclosed异常,并提供了解决方案:通过在使用Cursor对象之前调用startManagingCursor()方法,使Activity根据其生命周期管理Cursor。
问题描述:
使用Sqlite数据库时,有时候会报下面的异常:
Finalizing a Cursor that has not been deactivated or closed。
一个光标没有被停用或者关闭。
解决方法:
在使用Cursor对象前,调用startManagingCursor()方法,让Activity基于本身的生命周期,来管理Cursor的生命周期。
2691

被折叠的 条评论
为什么被折叠?