tract_runnable_spawn_state

Function tract_runnable_spawn_state 

Source
pub unsafe extern "C" fn tract_runnable_spawn_state(
    runnable: *mut TractRunnable,
    state: *mut *mut TractState,
) -> TRACT_RESULT
Expand description

Spawn a session state from a runnable model.

This function does not take ownership of the runnable object, it can be used again to spawn other state instances. The runnable object is internally reference counted, it will be kept alive as long as any associated State exists (or as long as the runnable is not explicitely release with tract_runnable_release).

state is a newly-created object. It should ultimately be detroyed with tract_state_destroy.