Closed alexpersian closed 7 years ago
Motive: The Block type alias is very useful, but it means it's not always clear that self will be strongly captured when using.
Block
self
Proposal: Add a second type alias called WeakBlock that expects a [weak self] capture list to ensure that strong reference cycles don't occur.
WeakBlock
[weak self]
Edit: so capture lists can't be specified through type aliases, so I'm going to solve this through documentation.
Addressed through #137
Motive: The
Block
type alias is very useful, but it means it's not always clear thatself
will be strongly captured when using.Proposal: Add a second type alias called
WeakBlock
that expects a[weak self]
capture list to ensure that strong reference cycles don't occur.Block
type alias to indicate that references should be weak.Edit: so capture lists can't be specified through type aliases, so I'm going to solve this through documentation.