mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
Fix leaks of WeakVec (#6576)
This commit is contained in:
parent
00a6032eb7
commit
5ca92bf984
@ -47,7 +47,7 @@ impl<T> WeakVec<T> {
|
||||
}
|
||||
if let Some(i) = self.empty_slots.pop() {
|
||||
self.inner[i] = Some(value);
|
||||
self.scan_slots_on_next_push = false;
|
||||
self.scan_slots_on_next_push = self.empty_slots.is_empty();
|
||||
} else {
|
||||
self.inner.push(Some(value));
|
||||
self.scan_slots_on_next_push = self.inner.len() == self.inner.capacity();
|
||||
|
Loading…
Reference in New Issue
Block a user