/// Retrieves ownership over the render callback and returns it where it can be re-used or
/// safely dropped.
Retrieves ownership over the render callback and returns it where it can be re-used or
safely dropped.
Retrieves ownership over the render callback and returns it where it can be re - used or safely dropped .
pub fn free_render_callback(&mut self) -> Option<Box<InputProcFnWrapper>> {
        if let Some(callback) = self.maybe_render_callback.take() {
            // Here, we transfer ownership of the callback back to the current scope so that it
            // is dropped and cleaned up. Without this line, we would leak the Boxed callback.
            let callback: Box<InputProcFnWrapper> = unsafe { Box::from_raw(callback) };
            return Some(callback);
        }
        None
    }
pub fn free_render_callback ( & mut self ) -> Option < Box < InputProcFnWrapper > > { if let Some ( callback ) = self . maybe_render_callback . take ( ) { // Here, we transfer ownership of the callback back to the current scope so that it // is dropped and cleaned up. Without this line, we would leak the Boxed callback. let callback : Box < InputProcFnWrapper > = unsafe { Box :: from_raw ( callback ) } ; return Some ( callback ) ; } None }
Retrieves ownership over the render callback and returns it where it can be re-used or
safely dropped.
Retrieves ownership over the render callback and returns it where it can be re - used or safely dropped .
&mut self