开发者

iPhone, why and how do i correct these anlyzer warnings while retaining a view controller?

开发者 https://www.devze.com 2023-01-20 09:26 出处:网络
I\'ve struggled to get a login / startup view to show before my mainWindow nav controllers and its finally 开发者_StackOverflow中文版working, but I\'m now getting these analyzer warnings. If I release

I've struggled to get a login / startup view to show before my mainWindow nav controllers and its finally 开发者_StackOverflow中文版working, but I'm now getting these analyzer warnings. If I release the navigation controller, the release in the dismiss button with cause an error.

what should I do here ?

iPhone, why and how do i correct these anlyzer warnings while retaining a view controller?


You get a warning, because you allocate a new object, but your reference is lost when the method returns. You probably want to make your lvc an instance variable, so that you can access it later (and maybe release it when it's no longer needed).

0

精彩评论

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