---
title: "Retain cycle or Retain loop"  
description: "Retain cycle or Retain loop"  
author: "Tarun Kumar"  
published: 2015-11-03  
updated: 2020-09-21  
canonical: https://www.mindstick.com/interview/22880/retain-cycle-or-retain-loop  
category: "iphone"  
tags: ["ios", "objective c"]  
reading_time: 1 minute  

---

# Retain cycle or Retain loop

When object A retains object B, and object B retains A. Then Retain cycle happens. To overcome this use "close" method.\
Objective-C's garbage collector (when enabled) can also delete retain-loop groups but this is not relevant on the iPhone, where Objective-C garbage collection is not supported.

## Answers

### Answer by Tarun Kumar

When object A retains object B, and object B retains A. Then Retain cycle happens. To overcome this use "close" method.\
Objective-C's garbage collector (when enabled) can also delete retain-loop groups but this is not relevant on the iPhone, where Objective-C garbage collection is not supported.


---

Original Source: https://www.mindstick.com/interview/22880/retain-cycle-or-retain-loop

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
