pub(crate) fn discard(&self, device: &VkDevice) {

        self.images.iter().for_each(|swapchain_image| {
            device.discard(swapchain_image.view);
        });

        unsafe {
            self.loader.destroy_swapchain(self.handle, None);
        }
    }
/// Destroy the `vk::SwapchainKHR` object.
///
/// The application must not destroy `vk::SwapchainKHR` until after completion of all outstanding operations on images that were acquired from the `vk::SwapchainKHR`.
Destroy the `vk::SwapchainKHR` object.
The application must not destroy `vk::SwapchainKHR` until after completion of all outstanding operations on images that were acquired from the `vk::SwapchainKHR`.
Destroy the ` vk :: SwapchainKHR ` object . The application must not destroy ` vk :: SwapchainKHR ` until after completion of all outstanding operations on images that were acquired from the ` vk :: SwapchainKHR ` .
pub(crate) fn discard(&self, device: &VkDevice) {
        self.images.iter().for_each(|swapchain_image| {
            device.discard(swapchain_image.view);
        });
        unsafe {
            self.loader.destroy_swapchain(self.handle, None);
        }
    }
pub ( crate ) fn discard ( & self , device : & VkDevice ) { self . images . iter ( ) . for_each ( | swapchain_image | { device . discard ( swapchain_image . view ) ; } ) ; unsafe { self . loader . destroy_swapchain ( self . handle , None ) ; } }
Destroy the `vk::SwapchainKHR` object.
Destroy the ` vk :: SwapchainKHR ` object .
&self
device
&VkDevice
&self
device
&VkDevice