What's the point of [weak self] on some closures?
sheinix opened this issue · 1 comments
sheinix commented
Hi, I'm trying to use the library in my project with Swift4. I have noticed a few [weak self]
in closures that don't make any difference as the closure is not held by self
itself, like in the DispatchQueue. Is there a reason for this?
Example:
DispatchQueue.main.async { [weak self] _ in
if self?.visibleSections[indexPath.section] == true {
....
}
okhanokbay commented
No, there is no reason, it makes no difference and should not be there.