forked from mshockwave/PdfiumAndroid
-
Notifications
You must be signed in to change notification settings - Fork 236
Open
Description
The library contains a memory leak when you open a PDF as a byte array.
I check the method nativeOpenMemDocument and found some weird memory copying code.
I've commented this code and memory leak has gone
TL;DR
I was running a 3 minutes autotest which opens the 50-pages PDF every 10 seconds.
This is the memory profiler results before the code commenting:
and you can clearly see that native memory grows and GC cannot clear it
This is the memory profiler results after the code commenting:
Now there is not such native memory issues. It stays relatively small and GC easily clears it
The issue was happening when I was calling the method PdfDocument newDocument(byte[] data, String password)
Metadata
Metadata
Assignees
Labels
No labels