pub trait Memory {
// Required methods
fn allocate<T>(&self, value: T) -> *mut T;
unsafe fn deallocate<T>(&self, pointer: *mut T);
}
Expand description
A type that can allocate and deallocate memory.
Required Methods§
Sourceunsafe fn deallocate<T>(&self, pointer: *mut T)
unsafe fn deallocate<T>(&self, pointer: *mut T)
Deallocates the memory associated with the supplied pointer.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.