pub fn destroy(
        &mut self,
        device_context: &VkDeviceContext,
    ) -> VkResult<()> {
        unsafe {
            device_context.device().device_wait_idle()?;
        }

        for resource in self.resources_in_flight.drain(..) {
            T::destroy(device_context, resource.resource)?;
        }

        Ok(())
    }
/// Immediately destroy everything. We assume the device is idle and nothing is in flight.
/// Calling this function when the device is not idle could result in a deadlock
Immediately destroy everything. We assume the device is idle and nothing is in flight.
Calling this function when the device is not idle could result in a deadlock
Immediately destroy everything . We assume the device is idle and nothing is in flight . Calling this function when the device is not idle could result in a deadlock
pub fn destroy(
        &mut self,
        device_context: &VkDeviceContext,
    ) -> VkResult<()> {
        unsafe {
            device_context.device().device_wait_idle()?;
        }
        for resource in self.resources_in_flight.drain(..) {
            T::destroy(device_context, resource.resource)?;
        }
        Ok(())
    }
pub fn destroy ( & mut self , device_context : & VkDeviceContext , ) -> VkResult < ( ) > { unsafe { device_context . device ( ) . device_wait_idle ( ) ? ; } for resource in self . resources_in_flight . drain ( .. ) { T :: destroy ( device_context , resource . resource ) ? ; } Ok ( ( ) ) }
Immediately destroy everything.
Immediately destroy everything .
&mut self
device_context
&VkDeviceContext
&mut self
device_context
&VkDeviceContext