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

Memory leak if a controller that has shut down is passed to MTRDevice deviceWithNodeID #25710

Closed
bzbarsky-apple opened this issue Mar 16, 2023 · 0 comments · Fixed by #25714
Closed
Labels

Comments

@bzbarsky-apple
Copy link
Contributor

It looks to me like if we pass a no-longer-running controller to deviceWithNodeID to create an MTRDevice we will:

  1. Have a reference cycle.
  2. Never break it, because the controller is already shut down.

Maybe the right thing to do in this case is simply to not add the device to the map (which is the state we would be in if we created the device first, and then shut down the controller)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant