You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: wgpu_integration.rs
    path of file: ./repos/egui/crates/eframe/src/native
    
    the code of the file until where you have to start completion: //! Note that this file contains code very similar to [`glow_integration`].
//! When making changes to one you often also wan
    
    fn save_and_destroy(&mut self) {
        crate::profile_function!();

        let mut shared = self.shared.borrow_mut();
        if let Some(Viewport { window, .. }) = shared.viewports.get(&ViewportId::ROOT) {
            self.integration.save(self.app.as_mut(), window.as_deref());
        }

        #[cfg(feature = "glow")]
        self.app.on_exit(None);

        #[cfg(not(feature = "glow"))]
        self.app.on_exit();

        shared.painter.destroy();
    }