Deinit

protocol Deinit

A destructor run when an owned value is dropped at scope exit. Linear types may not conform: they must be consumed explicitly.

Methods

consuming func deinit() -> Void

Runs type-specific cleanup while consuming the final owned value.

Under implicit sharing the hook can run once per retained copy. Implementations that require exactly-once logical cleanup must carry and check a DropToken.

View Source
consuming func deinit() -> Void