Alex Nabrozidis

07/11/2023, 12:17 PM
Hi, I think there might be a memory leak when using sqldelight (2.0.0-rc02) + Pager, or it could be that I'm using it wrong so I didn't want to create a bug report until someone can tell me whether the code looks fine or not... I've created a project that reproduces the issue
Copy code
The 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 <>.

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