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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:13:34+00:00 2026-05-23T12:13:34+00:00

I know about memory management rules and there is no need of what I

  • 0

I know about memory management rules and there is no need of what I am asking if I follow these rules. But, I wonder if there is a way to know if an instance is already deallocated without throwing an exception.
My app uses an object what any view on my app can become its delegate. Sometimes, I’m getting this well known error. I can avoid this by setting the delegate to nil on the dealloc method of the current delegate owner.
In summary… Do I have any way to know if an object is deallocated?

Thanks.

  • 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-05-23T12:13:34+00:00Added an answer on May 23, 2026 at 12:13 pm

    Can I tell if a pointer now points to garbage?

    No, not really. Once an object is deallocated, its memory can be reused at any time. Sometimes it’ll actually point to garbage (causing a crash), sometimes it’ll point to a different Obj-C object, and sometimes the memory will not have been reused yet.

    The main exception is that if you set the environment variable NSZombieEnabled=YES (in “edit scheme” somewhere in Xcode 4), the memory used by objects will never be deallocated (unless you also set NSDeallocateZombies=YES, or so); instead, sending a message to the zombie will cause an exception. It’s useful for debugging, largely because it tells you the class name of the instance that got deallocated.

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

Sidebar

Related Questions

SO I already know about memory management in objective C, and I never had
I'm still new to Cocoa and don't know much about memory management. I read
I really don't know squat about java memory management, so this is entirely my
I know the basic principles about memory management (retain count, autorelease pools etc) in
I've read many different things about correct memory management for cocoa/objective-c For instance ive
Yes i know i should read more about memory management, did try to find
I know this error has something to do with memory management but i must
There are a few things that I don't understand about iOS memory management. I
I had another question about memory management in iOS 3.0+, I know if we
I know what RAII does. It is all about preventing memory leaks etc. when/if

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.