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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:42:03+00:00 2026-05-16T15:42:03+00:00

Another puzzler. I have an NSArray (iTours) containing 3 Objects and a retain count

  • 0

Another puzzler. I have an NSArray (iTours) containing 3 Objects and a retain count of 1.

This Array is released in the object dealloc method as follows:

- (void)dealloc {
    NSLog(@"retain count für iTouren: %d", [iTours retainCount]);
    [iTours release];  // triggers EXC_BAD_ACCESS 
    [super  dealloc];
}

The console window shows the following message (no further details):

Program received signal:
“EXC_BAD_ACCESS”.

any clues what’s going on? What did I miss?

  • 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-16T15:42:04+00:00Added an answer on May 16, 2026 at 3:42 pm

    Most likely, you are over-releasing iTouren and, thus, that call to release is causing the crash. That is, iTouren is already deallocated by the time you release the containing array and when that containing array sends release to the already deallocated iTouren your app crashes.

    (Of course, iTours might be the object that is already deallocated. In any case, it is an over-release problem.)

    Turn on zombie detection and see if that barfs up the specific problem.

    Note that the

    number returned by retainCount is useless

    . Absolute retain counts are an implementation detail and will often be a specific value that seems like nonsense.

    In this case, the final release of an object does not decrement the retain count. Why? Because that’d be a wasted cycle when the object is about to be deallocated anyway. It would be impossible for retainCount to return 0 because, by definition, an object with a retain count of 0 has already been deallocated and, thus, is no longer a viable message receiver anyway.

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

Sidebar

Ask A Question

Stats

  • Questions 533k
  • Answers 533k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I think this question is a good question for steve@apple.com,… May 17, 2026 at 12:37 am
  • Editorial Team
    Editorial Team added an answer You can use backreferences to find pairs of things that… May 17, 2026 at 12:37 am
  • Editorial Team
    Editorial Team added an answer Only logical cause for you problem is that AutoEventWireup directive… May 17, 2026 at 12:37 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Having another issue, and this one is BAFFLING! Here we go. We have a
Here's another one I've been thinking about lately. We have concluded in earlier discussions
I have this preprocessor directive: #define INDEXES_PER_SECTOR BYTES_PER_SECTOR / 4 where BYTES_PER_SECTOR is declared
Another question on SO inspired me to try this code in C#: class Program
UPDATE: See my answer to this question first. This appears to be a bug.
I have a Board class where the constructor takes in the dimensions of the
I have a list of puzzles that are tagged with specific Themes. Think questions
I have a simple web page with a simple puzzle. There are some images
I have a bunch of ideas for different games (for programmers) where you have
I have been studying SOAP and WSDL in preparation for implementing a web service.

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.