When I analyze my app with Instruments, I found out that data allocated by CGContextDrawPDFPage is not released immediately. App getting crash because of
CGContextDrawPDFPage
This is by design. To allow faster re-draws, the CGPDFDocumentRef caches page resources.
The only way to empty this cache is to release and re-open the CGPDFDocumentRef.