Trait ext_php_rs::php::boxed::ZBoxable [−][src]
pub unsafe trait ZBoxable {
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.