caching bug in SQLiteDatabase causes invalid finalizer warnings
a bug in maintaining the cache caused these warnings. when the cache is full, caching code in SQLiteDatabase dropped an entry from the cache to accommodate the new one. and if the just-dropped one is not in use that object got GC'ed and caused a finalizer warning. Calendar is one app that didn't use ? for bindargs (sometimes) and noticed this bug in that app Fix is to not add the new enry to cache if the cache is already full. that will cause the app's close() to release the entry. another common case where this finalizer warning occurs is when unittests run. if the test does not close the database in tearDown(), it will cause database object and the compiled sql statement cache within the database obj get GC'ed which cause finalizer warnings.
Loading
Please register or sign in to comment