I'm working on several apps which are basically a PDF readers. Since iOS 6, apps started crashing because of being out of memory.
Our apps utilize PDF Reader, but a problem is not related to it. So far we found out:
1. leaking comes from CGContextDrawPDFPage
2. it is not there (or not so prominent) in iOS <6
3. leak does not occur on PDFS with no or small compression
To be specific: after opening a PDF with some compression, some memory is used. When PDF is closed, part of that memory is released. However, not all of it. You can easily get memory warning and then crash the app just by opening & closing PDF several times.
I've tried also PSPDF and although, it has advantages (speed) over PDF Reader, it's much more expensive and the same leaking is in there.
I have created very simple test project for PDF Reader and PSPDF Kit. (you just need to add some PDF to project)
Is there anything I can do to fix leaking in iOS 6 or am I doing something wrong and there is actually no leaking? My current approach is to wait for official fix.
I know the issue was discussed heavily here, but I believe my situation is a little bit different. (using ARC and tested libraries, leaking visible in simulator and on devices)
Thank you.