sdpolke sdpolke - 1 year ago 130
iOS Question

box-ios-preview-sdk : Memory leak in pspdfkit

I get memory leak for some pdf's in pspsdfkit being used in box-ios-preview-sdk.

initImageAppleJPEG : 1512 : falling back to libJPEG
initImageAppleJPEG : 1512 : falling back to libJPEG
initImageAppleJPEG : 1512 : falling back to libJPEG
initImageAppleJPEG : 1512 : falling back to libJPEG

Post this there is memory warning and the app crashes.

Is there any workaround available for this error. Any help would be highly appreciated.

Answer Source

That's a leak inside Apple's PDF renderer, which this version of PSPDFKit uses.

You can file a radar on radar.apple.com - the same leak will happen in Safari/iOS or any other app that uses the CGPDF API.

Edit: As of PSPDFKit 5 we use our own renderer, so this leak very likely no longer exists.

(I am a developer of PSPDFKit and was working with Box on their SDK.)