【发布时间】:2011-10-19 11:43:47
【问题描述】:
NSArray *imageExtension = [info.ThemeImage componentsSeparatedByString:@"."];
NSString *path = [[NSBundle mainBundle] pathForResource:[imageExtension objectAtIndex:0]ofType:@"png"];
UIImage *image = [[UIImage alloc]initWithContentsOfFile:path];
image=[image addImageReflection:0.50];
[CarouselView setFrame:CGRectMake(0,-200, image.size.width, image.size.height)];
UIButton *button = [[UIButton alloc]init];
[button setFrame:CGRectMake(0,0, image.size.width, image.size.height)];
[button setBackgroundImage:image forState:UIControlStateNormal];
[image release];
释放对象图像后,我确实有内存泄漏......
我不知道为什么它在仪器泄漏中显示内存泄漏
【问题讨论】:
-
addImageReflection 是否正在创建第二个图像对象?
标签: ios cocoa-touch memory-management