Alex Nabrozidis
07/11/2023, 12:17 PMThe current implementation of LeakActivity has a memory leak. OffsetQueryPagingSource when used with Pager does not call the unregister method from sqldelight's android driver when the activity finishes. This is the method not being called <https://github.com/cashapp/sqldelight/blob/master/drivers/android-driver/src/main/java/app/cash/sqldelight/driver/android/AndroidSqliteDriver.kt#L92>.
To test it launch the app, tap the button, and then press back when prompted. LeakCanary should eventually detect the leak.
I wanted to confirm whether I'm doing something obvious wrong before submitting a bug report.
Edit: I uploaded a leak trace https://github.com/nabrozidhs/sqldelight_leak/blob/main/leaktrace.txt