Note that there are some explanatory texts on larger screens.

plurals
  1. POiphone app crashing when I'm using an NSMutableDictionary
    primarykey
    data
    text
    <p>Got this code in my controllers (void)viewDidLoad method</p> <pre><code>self.purchasesPerClassification = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"Moo",nil] forKeys:[NSArray arrayWithObjects:@"MooKey",nil] ]; </code></pre> <p>as far I can under stand these are auto release as I have not used alloc init, and in my dealloc i have</p> <pre><code>[self.purchasesPerClassification release]; </code></pre> <p>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</p> <p>heres the .h </p> <pre><code>@interface FirstAiderInsurancePurchasesViewController : UITableViewController { NSArray * availableClassifications; NSMutableDictionary * purchasesPerClassification; } @property(nonatomic, retain) NSArray * availableClassifications; @property(nonatomic, retain) NSMutableDictionary * purchasesPerClassification; @end </code></pre> <p>and heres the .m parts</p> <pre><code>@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; } </code></pre> <p>I've tried both </p> <pre><code>[purchasesPerClassification release]; </code></pre> <p>as well and its crashing when I go back to the root controller </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload