Suggested approach: The first step is identification – looking for a place where leaks happen, and it’s important to mention either Instruments or the Memory Graph Debugger here. Leaks don’t always means retain cycles (for example, unused caches are effectively leaks), but they are a good starting point. Once you’ve found a possible retain cycle, you need to decide which side of the cycle should be made weak rather than strong in order to resolve it.
Estimated difficulty: Intermediate
Watch me answer this question in detail
See the full list of iOS interview questions
Link copied to your pasteboard.