开发者

UIAlertView and cocos2d memory mangement

I display a UIAlertView above my cocos2d layer.

I release it after I how it开发者_C百科.

Is it really gone? Do I have to somehow remove it from my UIView?


If you just do

UIAlertView* alert = [[UIAlertView alloc] initWithTitle...];
[alert show];
[alert release];

then there's no need to worry about it. However, if you set the alert's delegate to some object, make sure that object still exists when the user taps a button in the alert - otherwise your app will crash when the alert will try to call alertView:didDismissWithButtonIndex: delegate method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜