How do you convert this to a weak reference to self?
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(MyViewController.handleMessage(_:)), name: "NewMessage", object: nil)
NSNotificationCenter.defaultCenter().removeObserver(self, name: "NewMessage", object: nil)
Also, a related question--when does the view controller actually get destroyed? I'm assuming when you tab in and out of different views, view controllers still stay alive right? i.e. They don't get destroyed on viewDidDisappear.