Function capstone_sys::cs_close
[−]
[src]
pub unsafe extern "C" fn cs_close(handle: *mut csh) -> cs_err
Close CS handle: MUST do to release the handle when it is not used anymore. NOTE: this must be only called when there is no longer usage of Capstone, not even access to cs_insn array. The reason is the this API releases some cached memory, thus access to any Capstone API after cs_close() might crash your application.
In fact, this API invalidate handle
by ZERO out its value (i.e *handle = 0).
handle
: pointer to a handle returned by cs_open()
return CS_ERR_OK on success, or other value on failure (refer to cs_err enum for detailed error).