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

Possibly missing msg_send![..., retain] in wgpu-hal/src/metal/surface.rs #2974

Closed
jimblandy opened this issue Aug 20, 2022 · 4 comments
Closed

Comments

@jimblandy
Copy link
Member

#2826 removed a retain message send from Surface::from_view that incremented the reference count on view, without adding back anything complementary (that I can see). There's nothing in that PR to suggest that the old retain call was incorrect, and indeed, the returned Surface holds a new pointer to the view, so this seems like a bug.

@jimblandy
Copy link
Member Author

cc @jinleili

@jinleili
Copy link
Contributor

Yes, you are right.
Since Surface's view field is only called in destroy_surface, wouldn't it be better to just remove the view field?

@jinleili
Copy link
Contributor

Oops, still need view field on the iOS target.

@jimblandy
Copy link
Member Author

@jinleili I think this is closed. If there's anything missing, please re-open and fill me in.

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

No branches or pull requests

2 participants