Skip to content

Commit 5ea7288

Browse files
xiaopengli89Wumpf
authored andcommitted
Fix leaks of WeakVec (#6576)
1 parent f286882 commit 5ea7288

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ Bottom level categories:
4444

4545
### Bug fixes
4646

47+
48+
#### General
49+
50+
- Fix Texture view leaks regression. By @xiaopengli89 in [#6576](https://github.com/gfx-rs/wgpu/pull/6576)
51+
4752
#### Metal
4853

4954
- Fix surface creation crashing on iOS. By @mockersf in [#6535](https://github.com/gfx-rs/wgpu/pull/6535)

wgpu-core/src/weak_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl<T> WeakVec<T> {
4747
}
4848
if let Some(i) = self.empty_slots.pop() {
4949
self.inner[i] = Some(value);
50-
self.scan_slots_on_next_push = false;
50+
self.scan_slots_on_next_push = self.empty_slots.is_empty();
5151
} else {
5252
self.inner.push(Some(value));
5353
self.scan_slots_on_next_push = self.inner.len() == self.inner.capacity();

0 commit comments

Comments
 (0)