小编ale*_*lex的帖子

ImageIO initImageJPEG实例已分配但从未释放

我正在为iPhone开发一个应用程序,我发现以下代码导致内存分配增加.

    -(UIImage *)createRecipeCardImage:(Process *)objectTBD atIndex:(int)indx
{

[objectTBD retain];

// bringing the image for the background 
UIImage *rCard = [UIImage imageNamed:@"card_bg.png"];
CGRect frame = CGRectMake(00.0f, 80.0f, 330.0f, 330.0f); 

// creating he UIImage view to contain the recipe's data
UIImageView *imageView = [[UIImageView alloc] initWithFrame:frame];
imageView.image = rCard;

[rCard release];
imageView.userInteractionEnabled = YES;


float titleLabelWidth = 150.0;
float leftGutter = 5.0;
float titleYPos = 25.0;
float space = 3.0;
float leftYPos = 0;

// locating Title label
float currentHeight = [self calculateHeightOfTextFromWidth:objectTBD.Title …
Run Code Online (Sandbox Code Playgroud)

iphone uiimageview uiimage

5
推荐指数
1
解决办法
3430
查看次数

标签 统计

iphone ×1

uiimage ×1

uiimageview ×1