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:

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.
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.