removeFromParentViewController

iOS UIKit-UIViewController的SDK中下面方法:

/*
  Removes the the receiver from its parent's children controllers array. If this method is overridden then
  the super implementation must be called.
*/
- (void)removeFromParentViewController NS_AVAILABLE_IOS(5_0);

该方法在iOS 8.1中是立即释放controller,而在iOS 9(包括) 之后则是延迟释放controller。

因为只有安装了iOS 8.1的系统,所以不确定是否是iOS 8.1的个例,还是iOS 9之前都是立即释放。个人猜测应该是iOS 9之前都是立即释放,具体有待考证。

你可能感兴趣的:(removeFromParentViewController)