Drop implementation on Swapchain causes segmentation fault
When recreating the swapchain due to window resizing and destroying the swapchain during program termination, Drop on Swapchain causes a segmentation fault (found through running debugger).
Drop implementation:
```rs
impl Drop for Swapchain {
#[inline]
fn drop(&mut self) {
let fns = self.device.fns();
unsafe {
(fns.khr_swapchain.destroy_swapchain_khr)(
self.device.handle(),
self.handle,
ptr::null(),
)
};
}
}
```
I am on vulkano 0.35.2.
关闭于 2025-11-29 6 条评论