Thanks,

You are correct. I needed to retain it

@property (nonatomic, retain) NSMutableArray *tableList;
@property (nonatomic, retain) NSMutableArray *cfrTitleList;

Then dealloc it:

- (void)dealloc {
        [tableList release];
        [cfrTitleList release];
        [super dealloc];
}

I spent sometime yesterday reading on memory management and sure to have more 
questions...

Thanks again,

Phil

On Jan 18, 2010, at 5:58 PM, Alexander Spohr wrote:

> 
> Am 18.01.2010 um 14:40 schrieb Philip Vallone:
> 
>> Hi this is a follow up question on memory management. In my class 
>> BrowseViewController, I have a UITableView and 2 NSMutableArrays.
>> 
>> @interface BrowseViewController : UIViewController <UIActionSheetDelegate> {
>>      IBOutlet UITableView *tableView;
>>      NSMutableArray *tableList;
>>      NSMutableArray *cfrTitleList; 
>> }
>> @property(nonatomic, retain) UITableView *tableView;
>> 
>> @end
>> 
>> Now the BrowseViewController has a few "child" Navigational controllers. 
>> This allows the user to drill down. My question is, in the 
>> BrowseViewController.m dealloc method, if I release the two NSMutableArrays, 
>> I receive the error “EXC_BAD_ACCESS”.
> 
> Then you forgot to retain them when you should.
> Show code where they are assigned if you can’t fix it.
> 
>> If I don't release the NSMutableArrays, does this mean the 
>> navigationController takes ownership of the NSMutableArrays?
> 
> No, it does not even know they exist. How should it?
> 
>       atze
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to