iPhone APP委托分配警告 [英] iPhone APP delegate alloc warning

查看:182
本文介绍了iPhone APP委托分配警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在分配工具中看到了这个输出(太多警告之一)有人能告诉我这里有什么不好吗?与UIImage有关的东西以及我如何创建/使用导航控制器的错误

I see this output in allocations tool(one of too many warnings) Can anyone tell me what is going bad here? something with the UIImage and something very wrong with how I create/use navigation controller

这是我在APP_CATEGORIeS类导入中的imageview类别

And this is my category for imageview in APP_CATEGORIeS class import

@implementation UIImage(APP)
+(UIImage *) APP_IMAGE_BCKGROUND {
NSString *path = [[NSBundle mainBundle] pathForResource:@"bckPhone" ofType:@"png"];
return [UIImage imageWithContentsOfResolutionIndependentFile:path]; 
}


推荐答案

看起来你有一个 UIImage 在过去的视图中未被释放导致脏漏。确保你的视图过渡是平滑的(明智的分配)。

Looks like you have a UIImage in a past view that wasn't released that's causing dirty leak. Make sure your view transitions are smooth (allocations wise).

另外,如果你设置了两个不同的 anImageView 图像并将其保留在另一个类中,然后Xcode和编译器可能没有抓住它并警告你,但是当代码执行时会发生令人讨厌的事情。

On a separate note, if you're setting two different anImageView images and it's retained in another class then Xcode and the compiler might not be catching it and warning you, however that'll do nasty things when the code is executed.

这篇关于iPhone APP委托分配警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆