Search code examples
ioscocoamemory-managementiboutletviewdidunload

ios UIViewController not calling viewDidUnload


When I simulate a memory warning, viewDidUnload should run on unused objects, right?

How do I go about figuring out WHY my UIView won't go away?

FYI I'm using ARC and every ivar is an IBOutlet and looks like:

@property (nonatomic, weak) IBOutlet UIView *someView;

Solution

  • What class are we looking at here? Only UIViewControllers release their view in case of a mem warning.

    If this is a custom class or a custom added view, you should unload it yourself.