You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SQLCipherStatement.close() never closes its Cursor, leaking a CursorWindow per Room query #97
Room 3 (androidx.room3 3.0.3) prepares, steps and closes a statement per query, and it never calls reset() before close(). So every query leaves a CursorWindow for the finalizer to free.
Versions: sqlcipher-android 4.18.0 through 4.19.1 and the current default branch, with Room 3.0.3 and SQLCipherDriver.
Measured: we ran 20,000 point reads of one 20 KB row through Room with SQLCipherDriver, on Android emulators, with no manual GC.
API 36
API 29
SQLCipherDriver as shipped
+72 MB native heap
+244 MB native heap
close() calling reset() first
under 4 MB (0 KB after GC)
under 4 MB
The framework's AndroidSQLiteDriver showed 24 KB over the same reads.
Workaround: we wrap the driver so that each statement's close() calls reset() first:
Activity
developernotes commentedon Oct 9, 2026
Hi @langtind,
Great catch, thank you for the report. We will include a fix for this in the next release.