pub trait ClassDeinit {
// Provided method
unsafe fn deinit(_instance: *mut ConfObject) -> Result<()> { ... }
}
Expand description
A class can be deinitialized
Provided Methods§
sourceunsafe fn deinit(_instance: *mut ConfObject) -> Result<()>
unsafe fn deinit(_instance: *mut ConfObject) -> Result<()>
Called first on all objects being deleted, should do the opposite of init
and
deinitialize any additionally-allocated memory, destroy file descriptors, etc.
The default implementation of this method does nothing
§Safety
This method is unsafe because it may dereference a raw pointer. It is up to the implementation of this method to ensure that the pointer is valid.
Object Safety§
This trait is not object safe.