> On Mar 17, 2016, at 7:15 PM, William Shipley via swift-evolution > <[email protected]> wrote: > > Strong +1, with some nitpicks to enclosed example: > > I disagree that NSNotificationCenter’s returned token should be ignored > without warning—this goes against the patterns I’ve seen in programming Cocoa > the last 27 years, where needing to unregistering for notifications when an > object is unloaded is more common than registering once and leaving it for > the lifetime of the app.
NSObservervationCenter example: should not be marked. Most observer lifetimes will be shorter than the application's lifetime and view controllers should clean up after themselves when dismissed, hidden, or otherwise put away. The compiler should emit warnings about this use that the developer must override. Are you sure we are disagreeing? -- E
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
