imagine a Swift object A that has a reference to objects B and C, and that object B also has a reference to C as depicted in below:
Object A:
- Object B
- Object C
Object B:
- Object C
Assuming that all the references are strong, will this cause a memory leak? Should the reference to Object C by Object B be a weak one in order to avoid leaks?
Thanks!
See Question&Answers more detail:os