Frees an object.
unsafe fn free<T>(pool: &mut <Self as Allocator>::Pool, ptr: *mut T) -> ()
| Name | Description |
|---|---|
| pool | The pool to which the memory is returned. |
| ptr | The pointer to the object. |
If T has size 0, this function performs no operation. Otherwise:
The pointer argument must be a pointer returned by a previous call to allocate with the same allocator and pool. Otherwise the behavior is undefined.
After this function returns the pointer argument becomes invalid and must no longer be used.