Skip to content

Commit

Permalink
drop texture view before clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaopengli89 committed Apr 24, 2024
1 parent d3c1fcd commit fe2a633
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wgpu-core/src/device/life.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,10 @@ impl<A: HalApi> LifetimeTracker<A> {
&mut trackers.views,
|maps| &mut maps.texture_views,
);
for v in removed_views {
v.parent.views.lock().retain(|weak| weak.strong_count() > 0);
for view in removed_views {
let parent = view.parent.clone();
drop(view);
parent.views.lock().retain(|weak| weak.strong_count() > 0);
}
self
}
Expand Down

0 comments on commit fe2a633

Please sign in to comment.