1 2 3 4 5 6 7
/// Release the underlying FFI handle. Safe to call more than once. pub fn free(self: *{{ type_name }}) void { const handle = self._handle; if (handle == 0) return; self._handle = 0; c.{{ prefix }}_{{ type_snake }}_free(handle); }