mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Properly dispose of DescriptorAllocator
This commit is contained in:
@@ -775,10 +775,11 @@ impl<B: hal::Backend> Device<B> {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn destroy_self(self) {
|
||||
pub(crate) fn dispose(self) {
|
||||
self.com_allocator.destroy(&self.raw);
|
||||
let desc_alloc = self.desc_allocator.into_inner();
|
||||
unsafe {
|
||||
self.desc_allocator.lock().cleanup(&self.raw);
|
||||
desc_alloc.dispose(&self.raw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ impl<B: hal::Backend> Drop for Hub<B> {
|
||||
// self.adapters
|
||||
|
||||
for (_, (device, _)) in devices.map.drain() {
|
||||
device.destroy_self();
|
||||
device.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user