Skip to content

Commit 5ca92bf

Browse files
authored
Fix leaks of WeakVec (#6576)
1 parent 00a6032 commit 5ca92bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)