alef 0.83.0

Opinionated polyglot binding generator for Rust libraries
Documentation
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);
    }