with-disposal ( object quot -- )
Factor handbook » The language » Deterministic resource disposal » Using destructors

Prev:dispose ( disposable -- )
Next:dispose-each ( seq -- )


Vocabulary
destructors

Inputs
objecta disposable object
quota quotation with stack effect ( object -- )


Outputs
None

Word description
Calls the quotation, disposing the object with dispose after the quotation returns or if it throws an error.

Definition