Releasing appDelegate instances? [duplicate]
Possible Duplicate:
When should I release [[UIApplication sharedApplication] delegate] object?
I'm creating instances of UIApplication many times in my app to access shared infos, like this:
MyAppDelegate *appDelegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate];
appDelegate.ListingNav.navigationBarHidden = FALSE;
Well, how should it release all these appDelegate objects? Won't they create accumulated memory leaks ?
Thx for helping,
Stephane
In general, if you do not call alloc or retain, then you do not need to call release. You do not need to release appDelegate in this use case.
加载中,请稍侯......
精彩评论