Quartz PDF API Causing Out of Memory Crashes

前端 未结 2 1449
野的像风
野的像风 2021-01-21 13:44

I\'m having crashing issues using the Quartz PDF API for iOS. At the moment I am compiling with the SDK 4.0 GM Seed and running on my 3.2 iPad (I have tried using the 3.2 SDK wi

相关标签:
2条回答
  • 2021-01-21 14:39

    Aha! I've fixed the crashes by adding a UIGraphicsEndImageContext(); before beginning a new image context. I don't even get memory warnings now...

    0 讨论(0)
  • 2021-01-21 14:47

    Calling

    CGContextSetInterpolationQuality(context, kCGInterpolationHigh); 
    CGContextSetRenderingIntent(context, kCGRenderingIntentDefault);
    

    before CGContextDrawPDFPage solved a similar problem of mine.

    Credits goes to this answer of Johann: CGContextDrawPDFPage taking up large amounts of memory

    0 讨论(0)
提交回复
热议问题