Skip to content

Glossary: Swift Beyond the Basics

deinitializer

Also written: deinit

Code in a class, written `deinit`, that runs just before ARC frees an object. Printing from it shows exactly when the object goes. Structs have none.

Where the book teaches it

Related terms

ARC (automatic reference counting)retain cycle