Skip to main content

obj_free_buffer

Function obj_free_buffer 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn obj_free_buffer(ptr: *mut u8, len: usize)
Expand description

Free a buffer returned by an obj_doc_get / iteration call. Pairs with the Box<[u8]>::into_raw allocation done inside [box_bytes]. Null-tolerant; passing a (ptr, len) pair that did NOT come from libobj is undefined behaviour.

ยงSafety

  • ptr may be NULL (no-op).
  • If non-null, (ptr, len) MUST have been produced by a prior libobj call that documents this buffer-ownership convention.