-
Notifications
You must be signed in to change notification settings - Fork 920
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
Clean up weak references to texture views and bind groups #5595
Clean up weak references to texture views and bind groups #5595
Conversation
Tagging jimb on this as he's most aware of the lifetime management in wgpu-core |
1c964e5
to
977fb27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for tracking this down! Forgetting to ever actually trim those vectors was sloppy. I really hate backlinks like that, because they always seem to run into problems like this.
However, I think we can do a bit better.
@xiaopengli89 I've pushed a commit that makes the change I suggested. Could you look it over and see if it seems okay, and verify that it does fix the leak? |
@jimblandy LGTM. |
c7166d7
to
500804e
Compare
@jimblandy Sorry, we cannot use the change because |
* Clean up weak references to texture views * add change to CHANGELOG.md * drop texture view before clean up * cleanup weak ref to bind groups * update changelog * Trim weak backlinks in their holders' triage functions. --------- Co-authored-by: Jim Blandy <[email protected]>
* Clean up weak references to texture views * add change to CHANGELOG.md * drop texture view before clean up * cleanup weak ref to bind groups * update changelog * Trim weak backlinks in their holders' triage functions. --------- Co-authored-by: Jim Blandy <[email protected]>
* Clean up weak references to texture views * add change to CHANGELOG.md * drop texture view before clean up * cleanup weak ref to bind groups * update changelog * Trim weak backlinks in their holders' triage functions. --------- Co-authored-by: Jim Blandy <[email protected]>
* Clean up weak references to texture views * add change to CHANGELOG.md * drop texture view before clean up * cleanup weak ref to bind groups * update changelog * Trim weak backlinks in their holders' triage functions. --------- Co-authored-by: Jim Blandy <[email protected]>
Description
Cleanup weak references to texture views and bind groups to prevent leak.
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.