Skip to main content

DestroyFn

Type Alias DestroyFn 

Source
pub type DestroyFn = unsafe extern "C" fn(plugin: *mut Box<dyn Plugin>);
Expand description

Type signature for the plugin destruction function exported by cdylib plugins.

Frees a plugin previously returned by CreateFn. The loader calls this during shutdown or when unloading a plugin.

ยงSafety

  • plugin must have been returned by CreateFn from the same library
  • Must not be called more than once on the same pointer