Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8666395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:43:14+00:00 2026-06-12T17:43:14+00:00

I have never worked on non ARC based project. I just came across a

  • 0

I have never worked on non ARC based project. I just came across a zombie on my ARC based project. I found it was because of retain cycle.I am just wondering what is a retain cycle.Can

Could you give me an example for retain cycle?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:43:16+00:00Added an answer on June 12, 2026 at 5:43 pm

    A retain cycle is a situation when object A retains object B, and object B retains object A at the same time*. Here is an example:

    @class Child;
    @interface Parent : NSObject {
        Child *child; // Instance variables are implicitly __strong
    }
    @end
    @interface Child : NSObject {
        Parent *parent;
    }
    @end
    

    You can fix a retain cycle in ARC by using __weak variables or weak properties for your “back links”, i.e. links to direct or indirect parents in an object hierarchy:

    @class Child;
    @interface Parent : NSObject {
        Child *child;
    }
    @end
    @interface Child : NSObject {
        __weak Parent *parent;
    }
    @end
    

    * This is the most primitive form of a retain cycle; there may be a long chain of objects that retain each other in a circle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a ARC based project . I have never worked on
I have inherited a SSIS project. I have never worked with SSIS before, and
I have just arrived at new company and have never worked with Qt before,
I have never come across this issue but most recently I noticed that a
I have never worked on classic ASP and unfortunately I am supposed to modify
I've scrapped all the tutorials that have never worked for one reason or another,
I've never worked with a non-normalized database before, so I'll try and explain my
i have never worked with MKMapView or CoreLocation before so I need some help.
I'm fairly new to GWT and have never worked with Java Servlets before. I
I'm currently working with MVC 1.0 and have never worked with AJAX before and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.