From: Panayotis K. <pan...@pa...> - 2009-10-16 23:30:33
|
In the initialization code of UIWindow, there is a [self retain] I suspect that this is because, after exiting the "applicationDidFinishLaunching" method, UIWindow will get released (from the autorelease pool). Although it's a convenient thing and helpful for starters, I believe it's a dangerous approach. if we use more complex systems, like UIViewControllers (hint hint :P ), then we don't have just one and we change and replace these objects all the time. So just retaining them like in UIWindow is not really acceptable. Of course, if we have just a reference of them as a variable, and assign the UIWindow there, it's enough. This is a common practive in UIViewControllers, anyway But, it's not what it's done, up to now - and it seems like a non- uniformality That's my questioning... I'll be happy to hear thoughts about it :) |