Avatar
ふと思ったのだけど、これasync sequenceでうっかりメモリリーク作る原因になっちゃうね
3:57 AM
// ok async { [weak self] in for await notification in NotificationCenter.default... { guard let self = self else { break } self... } } // leak! async { [weak self] in guard let self = self else { return } for await notification in NotificationCenter.default... { self... } } こういうケースは前から結構あったし、async sequenceが出てきた以上無視できないようになったと思う