dealloc in Swift
deinit { // perform the deinitialization } From the Swift Documentation: A deinitializer is called immediately before a class instance is deallocated. You write deinitializers with the deinit keyword, similar to how intializers are written with the init keyword. Deinitializers are only available on class types. Typically you don’t need to perform manual clean-up when … Read more