Утечка памяти CGContextDrawPDFPage

Здравствуйте, вот мой код для рисования pdf в CATiledlayer

- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx
{

         CGContextSetRGBFillColor(ctx, 1.0, 1.0, 1.0, 1.0);
         CGContextFillRect(ctx, CGContextGetClipBoundingBox(ctx));
         CGContextTranslateCTM(ctx, 0.0, layer.bounds.size.height);
         CGContextScaleCTM(ctx, 1.0, -1.0);
         CGContextConcatCTM(ctx, CGPDFPageGetDrawingTransform(myPageRef, kCGPDFCropBox, layer.bounds, 0, true));
         CGContextDrawPDFPage(ctx, myPageRef);
 }

Все хорошо, но я получил предупреждение об утечке памяти в следующей строке

     CGContextDrawPDFPage(ctx, myPageRef);

Здесь myPageRef - это CGPDFPageRef

5
задан Mehul Mistri 29 June 2011 в 09:33
поделиться