DImuthuUpe / AndroidPdfViewer

Android view for displaying PDFs rendered with PdfiumAndroid
Apache License 2.0
8.16k stars 1.9k forks source link

High using memory after rotating screen #910

Open Shahriyar13 opened 4 years ago

Shahriyar13 commented 4 years ago

in my fragment's onDestroy i call:

pdfView.recycle pdfView = null call GC

but nothing changes, using a lots native ram after rotating 10-12 times, that's take 2GB of device's memory Screenshot (8)

tested on 3.1.0-beta.1 & 3.2.0-beta.1

pdfView.fromBytes(pdfByteArrays) .defaultPage(defaultPage) .onPageChange(this) .enableAnnotationRendering(true) .onLoad(this) .nightMode(isNightMode) .scrollHandle(new CircleScrollHandle(getContext())) .spacing(10) .onPageError(this) .load();

// pdfByteArrays comes from viewModel

Shahriyar13 commented 3 years ago

??????