Contents

bnns_graph_free_all_fn_t

The workspace and output deallocation function.

Declaration

typealias bnns_graph_free_all_fn_t = (UnsafeMutableRawPointer?, Int) -> Void

Return Value

0 on success, nonzero on failure.

Discussion

BNNS calls this function on the destruction of a graph context and should free all memory associated to the user_memory_context.

If you’ve supplied the same user_memory_context to both BNNSGraphContextSetWorkspaceAllocationCallback(_:_:_:_:_:) and BNNSGraphContextSetOutputAllocationCallback(_:_:_:_:_:), BNNS calls this function once, during BNNSGraphContextDestroy(_:).

See Also

Specifying a context’s allocation callbacks