【发布时间】:2011-03-31 09:05:01
【问题描述】:
我有问题。当我在 iPad 中使用“renderInContext”时,使用的内存永远不会释放并累积,直到应用程序以“内存警告”级别=1 和级别=2 关闭
我的代码:
CGRect mediaBox = CGRectMake(0, 0, 16.54 * 72.0, 24.02 * 72.0);
CGContextRef ctx = CGPDFContextCreateWithURL((CFURLRef)[NSURL fileURLWithPath:posterPath isDirectory:NO], &mediaBox, NULL);
CGPDFContextBeginPage(ctx, NULL);
CGContextScaleCTM(ctx, 0.516, -0.516);
CGContextTranslateCTM(ctx, 0, -mediaBox.size.height - 1500);
[[self returnBigView].layer renderInContext:ctx];
CGPDFContextEndPage(ctx);
CGPDFContextClose(ctx);
CGContextRelease(ctx);
我尝试了几种方法,但没有可用内存。有什么想法吗?
** 对不起我的英语不好
【问题讨论】: