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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:06:32+00:00 2026-06-03T15:06:32+00:00

One of my UIViewController has several child view controllers. They are built inside the

  • 0

One of my UIViewController has several child view controllers. They are built inside the interface builder, by dragging an NSObject to the “Objects” section at left, then put in my own SpecialViewController as “Custom Class”. With this setup, upon viewDidLoad I’ll have my views and the controller ready. The workflow is suggested by the following screenshot:

Drag "Object" to create instance

And in my implementation, I have:

@interface ParentController : UIViewController
{
     SpecialViewController *svc;
}
@property (nonatomic, retain) IBOutlet SpecialViewController *svc;

As I understand that during didReceiveMemoryWarning I should release my own resources. Then set IBOutlets to nil during viewDidUnload.

I get crashes when simulating low memory in the simulator, with debugger pausing at didReceiveMemoryWarning of SpecialViewController (whose body is just [super didReceiveMemoryWarning];), with error EXC_BAD_ACCESS (code=1, address=0xe0000008). At this time, the parent controller isn’t visible, so it can be safely released.

Parent controller also contains only [super didReceiveMemoryWarning]; in didReceiveMemoryWarning. I’ve tried niling IBOutlets in both classes. It didn’t help.

Any idea why this happened?

I’m targeting iOS 4 & 5 with ARC. SpecialViewController is a subclass of UITableViewController.

Through tracing, I found that ParentController didReceiveMemoryWarning is called before SpecialViewController.

  • 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-03T15:06:36+00:00Added an answer on June 3, 2026 at 3:06 pm

    It seems like you have a view controller with in a view controller here. Is there any particular reason that you have chosen to create the class like this? In my experience each UIViewController should be a separate subclass. Based on the fact that your error arises in didReceiveMemoryWarning, I believe that the issue is elsewhere. Can you share your initialization code for this View Controller?

    If you are attempting something like UIViewController Containment, you should probably check out the WWDC topic that covers this process.

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

Sidebar

Related Questions

I've declared two NSMutableArrays in the interface of one of my view controllers, as
I am using one UIViewController as shown: @interface RssViewController : UIViewController <UITableViewDataSource,UITableViewDelegate,BlogRssParserDelegate> I am
I made a mistake when I created one of my UIViewController objects. When I
I have a UIViewController whose view has a custom subview. This custom subview needs
Hello friends I am developing application in which view has one textField & 2
Summary From a conceptual point of view, should one be working with UIViewController subclasses
I have a UITabBarController setup with 2 UINavigationControllers. One UINavigationController has One UIViewController, the
I have two UITableView, each one has a different delegate in the same UIViewController.
I've got a fairly visually complex app that has a base UIViewController and several
My application has two ViewControllers linked with NavigationController. The First NavigationController has one view

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.