MCPcopy Create free account
hub / github.com/argumentcomputer/ix / free_linear_object

Function free_linear_object

c/linear.h:229–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229static inline void free_linear_object(linear_object *linear) {
230 // Only finalize `object_ref` if `linear` is the latest linear object reference
231 // or if the finalizer was forcibly set as allowed. By doing this, we avoid
232 // double-free attempts.
233 if (LEAN_UNLIKELY(!linear->outdated || linear->finalize_even_if_outdated)) {
234 linear->finalizer(linear->object_ref);
235 }
236 free(linear);
237}
238
239/* --- API to implement Lean objects --- */
240

Callers 1

linear_object_finalizerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected