CGPDFPage excessively caching content stream

Number:rdar://7445621 Date Originated:04-Dec-2009 10:45 PM
Status:Closed Resolved:
Product:iPhone OS Product Version:3.1.2
Classification:Serious Bug Reproducible:Always

CGPDFPage excessively caching content stream

Steps to Reproduce:

When a CGPDFPageRef is obtained via CGPDFDocumentGetPage(), its memory usage is minimal. However, once that page has been rendered using CGContextDrawPDFPage(), its content stream appears to be cached somewhere.

For pages with lots of images this is a problem, because the CGPDFDocument appears to retain the page until it is itself released, even during low memory warnings on the iPhone, and the CGPDFPage does not appear to relinquish its cache until it is deallocated.

Expected Results:

A low memory warning should cause CGPDFPage to flush its cache.

Actual Results:

A low memory warning does not cause CGPDFPage to flush its cache.




I think this is a duplicate of bug #6367689. I have also opened a DTS request on the issue (Follow-up:  [redacted]). Please consider this a strong vote to have it fixed! It really is critical on a device with such little memory; the existence of this bug essentially means that writing a PDF viewer is impossible.


Fixed? Where and how? I can pay.

Hello Hamish. Where and how is fixed in iOS 4.0? I can pay you for a good answer about this. Thank you.

Fixed in iOS 4.0

Fixed in iOS 4.0

Even in iOS 5.0 or iOS 5.0.1 not fixed

same issue replicating in all the ios versions only way to refreshing the document removing cache.

By ajay.pasumarthi at Feb. 12, 2012, 7:54 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!