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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:27:13+00:00 2026-06-13T19:27:13+00:00

In ARC, when an object is released, the pointer is set to nil. How

  • 0

In ARC, when an object is released, the pointer is set to nil.

How does the object tell all those points that it’s about to be released?

Does this work for strong pointers or all types of pointers?

  • 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-13T19:27:15+00:00Added an answer on June 13, 2026 at 7:27 pm

    Based on some quick reading of what ARC required be added to the Objective-C runtime, the weak reference itself is registered with the runtime. There are a bunch of calls for setting up a weak connection, tearing it down and reassigning it. The compiler acts to decide what sort of assignment to do, much as it also has a role in automatically retaining and releasing. Per the linked document:

    The runtime tracks __weak objects which holds non-null values. It is
    undefined behavior to direct modify a __weak object which is being
    tracked by the runtime except through an objc_storeWeak,
    objc_destroyWeak, or objc_moveWeak call.

    From that I’d conclude that the runtime maintains a collection of every weak pointer that currently points to a given object. When that object is deallocated it zeros out the pointers.

    So there is a list, per object, that points to the relevant pointers to create a two-directional connection. How and where that’s stored isn’t explicit — it could be via the existing object association mechanisms, it could be a global dictionary, it could be just about anything.

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

Sidebar

Related Questions

Problem : I have an __unsafe_unretained id pointer that points to an already released
Does the automatic reference counting release an object if I set the pointer to
~ Will ARC always release an object the line after the last strong pointer
I`m getting the following warning. Reference-counted object is used after it is released ARC
I was reading a little about ARC and I saw this: @interface Address :
Does ARC ever inject retain and release calls that you generally wouldn't see in
How to tell ARC do not release objects in main thread, which are used
I am using ARC in my code and I am getting the error Object
for an iOS 5.0 application using ARC, i have an NSArray of objects that
The ARC Migration Tool is having trouble with this: NSURL *fileURL = [NSURL fileURLWithPath:path];

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.