pub unsafe trait ZBoxable {
    // Provided method
    fn free(&mut self) { ... }
}
Expand description

Implemented on types that can be heap allocated using the Zend memory manager. These types are stored inside a ZBox when heap-allocated, and the free method is called when the box is dropped.

§Safety

The default implementation of the free function uses the efree function to free the memory without calling any destructors.

The implementor must ensure that any time a pointer to the implementor is passed into a ZBox that the memory pointed to was allocated by the Zend memory manager.

Provided Methods§

source

fn free(&mut self)

Frees the memory pointed to by self, calling any destructors required in the process.

Implementors§