viewdidunload is a method of a UIViewController. If you are using a UIViewController subclass to create an object and that obect's view is removed from superview then viewdidunload will be called. Make sure that your child view is made from a UIViewController.