OxL Reference

interface Drop

Types with cleanup code that runs when a value goes out of scope (impl Drop).

Example:

oxl✓ checked in CI
data Guard { id: i64 }

// the body of `drop` has no effects: it cannot print or call the network
impl Drop for Guard {
  var fn drop() {
    let released = self.id
  }
}
@explicit pub(api) interface Drop

Since. 1.0.0-beta

Defined in: std/core/types.oxl:834

See also