pub fn destroy(pool: *Pool, ptr: ItemPtr) void
Destroys a previously created item. Only pass items to ptr that were previously created with create() of the same memory pool!
ptr
create()
pool: *Pool
ptr: ItemPtr
127 128 129 130
pub fn destroy(pool: *Pool, ptr: ItemPtr) void { ptr.* = undefined; pool.free_list.prepend(@ptrCast(ptr)); }
Destroys a previously created item. Only pass items to
ptrthat were previously created withcreate()of the same memory pool!