fn cleanup_unused_gpu_resources_for_window(app: &App, window_id: window::Id) {
    let windows = app.windows.borrow();
    let mut guard = windows[&window_id]
        .swapchain
        .previous_frame_end
        .lock()
        .expect("failed to lock `previous_frame_end`");
    if let Some(future) = guard.as_mut() {
        future.cleanup_finished();
    }
}
// Each window has its own associated GPU future associated with displaying the last frame.
// This method cleans up any unused resources associated with this GPU future.
Each window has its own associated GPU future associated with displaying the last frame.
This method cleans up any unused resources associated with this GPU future.
Each window has its own associated GPU future associated with displaying the last frame . This method cleans up any unused resources associated with this GPU future .
fn cleanup_unused_gpu_resources_for_window(app: &App, window_id: window::Id) {
    let windows = app.windows.borrow();
    let mut guard = windows[&window_id]
        .swapchain
        .previous_frame_end
        .lock()
        .expect("failed to lock `previous_frame_end`");
    if let Some(future) = guard.as_mut() {
        future.cleanup_finished();
    }
}
fn cleanup_unused_gpu_resources_for_window ( app : & App , window_id : window :: Id ) { let windows = app . windows . borrow ( ) ; let mut guard = windows [ & window_id ] . swapchain . previous_frame_end . lock ( ) . expect ( " " ) ; if let Some ( future ) = guard . as_mut ( ) { future . cleanup_finished ( ) ; } }
Each window has its own associated GPU future associated with displaying the last frame.
Each window has its own associated GPU future associated with displaying the last frame .
app
&App
window_id
window::Id
app
&App
window_id
window::Id