我有一个问题。当我使用iPad上的“renderInContext”,使用的内存永远不会释放和累积,直到该应用程序与“Memory警告”级别= 1和Level = 2renderInContext /内存问题
我的代码将关闭:
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);
我已经尝试了几种方法,但没有空闲的记忆。有任何想法吗?
**对不起,我的英文不好
可能有人帮助我吗? – mhergon 2011-03-31 16:31:47