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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:58:06+00:00 2026-05-30T19:58:06+00:00

I am attempting to debug an issue where an object is released too many

  • 0

I am attempting to debug an issue where an object is released too many times and is then deallocated by the event loop. The next time I try to read from the object, the application crashes with EXC_BAD_ACCESS.

To debug, I am enabling NSZombies and then using the Zombies profile with Instruments. I then reach the point where my app crashes and Instruments informs me about a message being sent to a deallocated instance. So far, so good.

It does a very good job of showing me where libraries such as UIKit are releasing and retaining the pointer to my object, but it does not show me where my own code is doing this. It is also not displaying the true reference count. By the time that Instruments says that the reference count is 1, the reference count is actually 8 according to printing out the reference count in gdb.

I have investigated the possibility that Instruments is somehow filtering the output but it would appear that I really am recording every release and retain event. It absolutely must be something in my application because my view controller is instantly deallocated after displaying, meaning that attempting to do anything that would send a message to the controller would crash it.

After placing a breakpoint in the dealloc method, I found that my object is indeed being deallocated by the event loop, so this is not a case of a rogue call to dealloc by something else.

  • 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-30T19:58:07+00:00Added an answer on May 30, 2026 at 7:58 pm

    You can’t rely on reference count as Apple’s Framework classes may hold their own references to your objects. The reference count is meaningless for debugging.

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

Sidebar

Related Questions

I am having a really hard time attempting to debug LINQ to SQL and
I am attempting to debug a dll that is called by a Labview application.
I am attempting to debug some C code using the visual studio debugger. I
I'm receiving a rather cryptic error when attempting to debug a simple C++ application.
Issue We are using config transforms inside our solution. For example: Debug, Test, Staging,
I'm attempting to debug an R program, and I'm sorely missing the stop if
I'm attempting to debug why my application is attempting to connect to my database
I get this error when attempting to debug my form, I cannot see where
I am attempting to debug a (RESTful) WCF app using Fiddler. I run my
I've been attempting to debug this all morning but can't seem to find the

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.