Weak Self in Array Filter ?

I'm still not sure when to use [weak self] within closures I do use trailing closures probably more often than I should. This question though, would I need to use it in the case of an Array Filter ?

Accepted Reply

If you mean `Array` is a Swift Array and `filter` is a method defined in Swift Standard Library, the answer is no.

You have no need to use `[weak self]`, when using `Array.filter`.


If you want to discuss on some specific example, please show the concrete example.

Replies

If you mean `Array` is a Swift Array and `filter` is a method defined in Swift Standard Library, the answer is no.

You have no need to use `[weak self]`, when using `Array.filter`.


If you want to discuss on some specific example, please show the concrete example.