new-disposable ( class -- disposable )
Factor handbook » The language » Deterministic resource disposal » Writing new destructors

Prev:disposable
Next:dispose* ( disposable -- )


Vocabulary
destructors

Inputs
classa class


Outputs
disposablea disposable


Word description
Constructs a new instance of a subclass of disposable. This sets the id slot, registers the new object with the global disposables set, and if debug-leaks? is on, stores the current continuation in the continuation slot.

Definition