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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:44:13+00:00 2026-06-13T07:44:13+00:00

Consider I am allocating an object. Please see the below image In the above

  • 0

Consider I am allocating an object. Please see the below image

enter image description here

In the above image *myObject is a pointer. It is referring to an space allocated to that object. When we retain the object, I like to know what it does at backend. Also I like to know why we are doing that.

Also when we release it how it works at backend.

I also like to know what happens at backend when we copy an object.

I am really sorry if my question is so basic.

  • 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-13T07:44:14+00:00Added an answer on June 13, 2026 at 7:44 am

    What retain actually does under the hood is:

    1. Take a global lock in the objc runtime
    2. Look up a hash table entry based on the pointer to the object being retained
    3. Increment a counter in that entry
    4. Release the lock

    I don’t expect this to be all that helpful in practice, but I think it’s what you were asking for.

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

Sidebar

Related Questions

Consider the following Mechanize form object #<Mechanize::Form {name f1} {method POST} {action f.php} {fields
I am allocating memory to a object dynamically and then if I call delete
May I request that I any responder consider only pure C/C++ (whatever that means)?
Please consider the following two initialization methods. The first method simply passes the value
Consider this simple controller: Porduct product = new Product(){ // Creating a product object;
Consider the following code: class A { B* b; // an A object owns
Consider a function that returns a Type* , and so it looks like it
I'm wondering about the proper way of allocating memory to a pointer (C/C++ style)
Consider a Linux driver that uses get_user_pages (or get_page ) to map pages from
Please, look at the following code that just convert an unsigned int to a

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.