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 7930589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:28:27+00:00 2026-06-03T20:28:27+00:00

Apple’s Advanced Memory Management doc is pretty well written and precise, but I wonder

  • 0

Apple’s Advanced Memory Management doc is pretty well written and precise, but I wonder for its diagram it has:

(mine is the current revision 2011-09-28)

enter image description here

In the diagram, after the alloc and init, the reference count (or the retain count) is 1, which is the basic memory management rule. After the retain, the reference count is now 2. And then Class C sends a copy message to the object, and after that, the object still has a reference count of 2. The new object has a reference count of 1.

So far this conforms to the rules, but next, on the top of the diagram, Class A sends a release message to the object, and the reference count should be a 1? The diagram has a 2 instead. Then Class B also sends a release message to the object, and the reference count now should be 0. The diagram shows a 1 instead. Is this correct, or maybe there is a different way to read the diagram, or maybe some concept is not correct above?

  • 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-03T20:28:28+00:00Added an answer on June 3, 2026 at 8:28 pm

    I think the diagram is a little misleading in two ways. One is that for the alloc and retain steps, the associated counts are what happens as a result of the operation. At the release steps, however, the counts appear to be the state before the operation. That’s all that makes sense to me because there is no “Destroyed” method to cause a 1-to-0 transition.

    The other misleading part is, I don’t think the retain count ever truly goes to zero and I’ve seen people get confused by believing that it does.

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

Sidebar

Related Questions

Apple has extremely comprehensive documentation, but I can't find any documentation for the function
Apple has marked most (but not all) of the OpenSSL API as deprecated in
Apple has included HTTP Adaptive Bitrate Streaming in the iPhone OS 3.0, in particular
Apple introduced Grand Central Dispatch (a thread pool) in Snow Leopard, but haven't gone
Apple seems to say that this image should have no extension. But how is
Apple has explained in Launching the App Store from an iPhone application how one
Apple developer document has the QTKit examples. I have noticed that it is only
Apple says: removeFromSuperview Unlinks the receiver from its superview and its window, and removes
Apple has a nice little tutorial for making a simple master-detail interface. Interface Builder
Apple says that this is a good idea for saving memory. What would that

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.