2013年4月10日 星期三

didReceiveMemoryWarning for 5 & 6

- (void)didReceiveMemoryWarning; // Called when the parent application receives a memory warning. On iOS 6.0 it will no longer clear the view by default.

…….  看來對於 iOS 5.x 還有多餘的方式要處理了

    [superdidReceiveMemoryWarning];

    // Dispose of any resources that can be recreated.

if ([self isViewLoaded] && [self.view window] == nil)

    {

        // Add code to preserve data stored in the views that might be

        // needed later.

        // Add code to clean up other strong references to the view in

        // the view hierarchy.

self.view = nil;

    }

最近才知道  iOS 6.x 要加入這些code

然後Xcode還不會自動產生  = ="

不過遇到了一些詭異的問題....

iOS 5.x 在某些狀況下 wm兩次會crash....

還不知道發生了什麼事情orz

沒有留言:

張貼留言