mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 22:41:07 +01:00
Properly dispose of DescriptorAllocator
This commit is contained in:
1 parent
ff1adb34d9
commit
384de9ca52
2 files changed
+4
-3
No files matched your search
@@ -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