• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [iphone] Release Navigation View Controller Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iphone] Release Navigation View Controller Question


  • Subject: Re: [iphone] Release Navigation View Controller Question
  • From: Alexander Spohr <email@hidden>
  • Date: Mon, 18 Jan 2010 23:58:41 +0100

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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [iphone] Release Navigation View Controller Question
      • From: Philip Vallone <email@hidden>
References: 
 >[iphone] Release Navigation View Controller Question (From: Philip Vallone <email@hidden>)
 >Re: [iphone] Release Navigation View Controller Question (From: Tom Davie <email@hidden>)
 >Re: [iphone] Release Navigation View Controller Question (From: Philip Vallone <email@hidden>)
 >Re: [iphone] Release Navigation View Controller Question (From: Philip Vallone <email@hidden>)

  • Prev by Date: Problem with changes to NSArrayControllers array causing crash
  • Next by Date: Re: Make sheets open instantly
  • Previous by thread: Re: [iphone] Release Navigation View Controller Question
  • Next by thread: Re: [iphone] Release Navigation View Controller Question
  • Index(es):
    • Date
    • Thread