[][src]Function mruby::def::rust_data_free

pub unsafe extern "C" fn rust_data_free<T: RustBackedValue>(
    _mrb: *mut mrb_state,
    data: *mut c_void
)

A generic implementation of a Free function for mrb_values that store an owned copy of an Rc smart pointer.

Warning: This free function assumes the data pointer is an Rc<RefCell<T>>. If that assumption does not hold, this function has undefined behavior and may result in a segfault.