I would like to perform some cleanup at the end of a view controller's life, namely to remove an
NSNotificationCenter notification. Implementing
dealloc results in a Swift compiler error:
Cannot override 'dealloc' which has been marked unavailable
What is the preferred way to perform some cleanup at the end of an object's life in Swift?