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

  • Home
  • SEARCH
  • 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 3402624
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:09:40+00:00 2026-05-18T05:09:40+00:00

Got this code in my controllers (void)viewDidLoad method self.purchasesPerClassification = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@Moo,nil] forKeys:[NSArray

  • 0

Got this code in my controllers (void)viewDidLoad method

self.purchasesPerClassification = [NSMutableDictionary 
                                  dictionaryWithObjects:[NSArray arrayWithObjects:@"Moo",nil] 
                                  forKeys:[NSArray arrayWithObjects:@"MooKey",nil]
                                  ];

as far I can under stand these are auto release as I have not used alloc init,
and in my dealloc i have

[self.purchasesPerClassification release];

this is part of a controller with UITableViewController and this controller is created an loaded from a main container and added to the main contollers navigationController this seems to make my app crash in the simulator as when I dont have it in the code it works fine any pointers on why this is crashing

heres the .h

@interface FirstAiderInsurancePurchasesViewController : UITableViewController {

    NSArray * availableClassifications;

    NSMutableDictionary * purchasesPerClassification;

}

@property(nonatomic, retain) NSArray * availableClassifications;
@property(nonatomic, retain) NSMutableDictionary * purchasesPerClassification;

@end

and heres the .m parts

@implementation FirstAiderInsurancePurchasesViewController
@synthesize availableClassifications;
@synthesize purchasesPerClassification;

- (void)viewDidLoad {
    [super viewDidLoad];

    self.availableClassifications = [NSMutableArray arrayWithObjects:@"Completed",@"Recover's",nil];

    self.purchasesPerClassification = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"Object",nil]
                                                                          forKeys:[NSArray arrayWithObjects:@"ObjectKey",nil]];

}
- (void)dealloc {
    [super dealloc];
    self.availableClassifications = nil;
    self.purchasesPerClassification = nil;
}

I’ve tried both

[purchasesPerClassification release];

as well and its crashing when I go back to the root controller

  • 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-18T05:09:40+00:00Added an answer on May 18, 2026 at 5:09 am

    Firstly, what is the property definition of purchasesPerClassification?

    Anyway, assuming it’s copy or retain, you probably want either:

    self.purchasesPerClassification = nil;
    

    or

    [purchasesPerClassification release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got the following code in one of my view controllers: - (void)tableView:(UITableView *)tableView
I've got this code: rs1 = getResults(sSQL1) rs2 = getResults(sSQL2) rs1 and rs2 and
I've got this code in a pair of button click event handlers on a
I've got this code here: SqlCommand CodeStatus = new SqlCommand(SQL, DB); DB.Open(); Reader =
How can I fetch images from a server? I've got this bit of code
I got this doubt while writing some code. Is 'bool' a basic datatype defined
I was given this code a while back. I finally got around to testing
I've got a problem with inheritance and generics. This is the code that illustrates
I got some legacy code that has this: <?PHP if(isset($_GET['pagina'])==homepage) { ?> HtmlCode1 <?php
I've got some code that looks like this: using (DBDataContext dc = new DBDataContext(ConnectionString))

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.