Skip to content
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

For java binding, ensure the cluster object is be freed when the session is released #20267

Closed
kghost opened this issue Jul 4, 2022 · 4 comments
Labels
android p1 priority 1 work stale Stale issue or PR V1.0

Comments

@kghost
Copy link
Contributor

kghost commented Jul 4, 2022

Problem

The cluster object is ephemeral, but in Java implementation, its lifespan is managed by GC. It must guarantee that the cluster object is be freed when the session is released.

Proposed Solution

The Java and objective-c binding should implement OnSessionReleased callback, null-out the cluster, and deny all future operations to the cluster.

@woody-apple
Copy link
Contributor

@bzbarsky-apple Should we separate the darwin and android changes here?

@bzbarsky-apple
Copy link
Contributor

The Darwin part of this was fixed in #21504: we no longer hold on to CHIPCluster objects anywhere on the heap; we just stack-allocate them. So this is a pure Android issue now.

@bzbarsky-apple bzbarsky-apple changed the title For java and objective-c binding, ensure the cluster object is be freed when the session is released For java binding, ensure the cluster object is be freed when the session is released Aug 2, 2022
@bzbarsky-apple bzbarsky-apple removed their assignment Aug 2, 2022
@franck-apple franck-apple added the p1 priority 1 work label Oct 24, 2022
@stale
Copy link

stale bot commented Apr 25, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Apr 25, 2023
@stale
Copy link

stale bot commented May 4, 2023

This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android p1 priority 1 work stale Stale issue or PR V1.0
Projects
None yet
Development

No branches or pull requests

4 participants