Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
212 views
in Technique[技术] by (71.8m points)

ios - iPhone APP delegate alloc warning

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

enter image description here

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]; 
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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).

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...