-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Secure scheduler release #7094
Comments
Isn't this the |
The |
That's just a bug, then. |
IMHO you should not hold on the the scheduler, you create. Once you have assigned it to the configuration, you can release it. |
I have tried, but the capi scheduler free callback is not triggered. |
I think they are calling this API: |
@nicola-cab I am working with @rorbech on a resolution. The problem is that they store a shared pointer to the scheduler inside the userdata. So the scheduler is never released and hence the userdata is never released. |
ah great @jedelbo !... thanks for letting me know. |
Describe your problem or use case
We require a method to ensure the secure release of schedulers after closing a Realm.
Sometimes, even after closing a Realm and disposing of the scheduler, it might still receive and execute a job, which could lead to a null pointer exception. This issue is concerning because the SDK manages the scheduler's lifecycle, and there's no clear way to determine when it's safe to release them.
While not always reproducible, this problem can be observed in the Kotlin SDK when initiating a client reset, closing the Realm, and releasing the scheduler.
Describe the solution you'd like
We like to release any scheduler safely.
Additional context
This issue might be related to #6429
The text was updated successfully, but these errors were encountered: