1

How capturing rules work if being inside some block we broadcast weakly captured object (self for example) to the next escaping block?

myBlock = { [weak self] in
    ...
    nextBlock() { [weak self] in // is it necessary if `weak self` already captured in parent block?
        ...
    }
}

If we don't write [weak self] in the child block, does self become strongly captured or remains weak?

brigadir
  • 6,874
  • 6
  • 46
  • 81
  • You only need `[weak self]` in the outer capture list – compare https://stackoverflow.com/q/41991467/2976878 (dupe?) – Hamish Jun 19 '18 at 14:56

0 Answers0