ux-primitives 0.2.2

Graphics Primitives for Angular Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// The Disposable should be implemented by objects that require
/// specialised garbage collection or memory deallocation.
/// 
/// Once an object is disposed it should be automatically removed from parent heirachies.
///
pub trait Disposable {
    /// Returns true if the object has been disposed (or is being disposed).
    fn is_disposed(&self) -> bool;

    /// Disposes this object by deallocating all used resources and breaking all
    /// (non-weak) references to other objects. This method must be the final
    /// call in the object's life cycle. No methods except this method should be
    /// called on the object and no properties of the object should be read or
    /// written after a call to this object; otherwise the behaviour is
    /// unreliable. The object may call the method on itself, directly or
    /// indirectly.
    fn dispose(&self);
}