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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:42:11+00:00 2026-06-14T09:42:11+00:00

In didFinishLaunchingWithOptions, the first code is: NSMutableArray *k = [[NSMutableArray alloc] initWithCapacity:10]; [k release];

  • 0

In didFinishLaunchingWithOptions, the first code is:

NSMutableArray *k = [[NSMutableArray alloc] initWithCapacity:10];
[k release];

(I reduced it to this case after much debugging) and I’m getting

*** -[__NSArrayM class]: message sent to deallocated instance 0x7576c90
*** -[__NSArrayM respondsToSelector:]: message sent to deallocated instance 0x7576c90

If I check the retainCount on ‘k’ after the alloc line, it is 1. If I replace NSMutableArray by NSArray everything is fine. What the heck is going on here??

  • 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-14T09:42:12+00:00Added an answer on June 14, 2026 at 9:42 am

    That error must be coming from somewhere else. Which means you’re using it.
    Else, you wouldn’t have

    *** -[__NSArrayM respondsToSelector:]: message sent to deallocated instance 0x7576c90
    

    But something like :

    *** -[__NSArrayM release]: message sent to deallocated instance 0x7576c90
    

    Plus, you should not use retainCount (see why here).

    Just check that you’re not using it anywhere else. Or maybe you’re using ARC ? In which case you don’t need to release it.

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

Sidebar

Related Questions

How can I detect the very first time launch of - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
I have added navigation controller into my appication in didFinishLaunchingWithOptions like this LoginViewController *mainView
I've enabled ARC, In my didFinishLaunchingWithOptions method, I wrote the following code: AppDelegate.h: @interface
I'm having problems getting my iPad app to detect its interfaceOrientation in the first
I am just trying to write my very first code in Objective C. I
First off my code was working fine on simulator but it does not work
Im my application I have the following code, the first bit runs when my
i'm working on a iOS5+ project (xcode 4.4.1 SDK 5.1) i have this code
So I have to admit, that I had this code working perfectly up until

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.