内存不足的MuPdf [英] OutOfMemory in MuPdf
问题描述
您好,我用我的项目MuPdf库查看文档。问题是,当你在一个活动打开的文档3-7的片剂11英寸,我得到内存溢出。当加载一个新的文档,以previous文件的所有引用被破坏,但是从内存中的文件的图像不会被删除。对象是10-12兆内存映像中创建的。
在平板电脑7英寸大小这个问题不会出现。
Hello I am using MuPdf library in my project to view documents. The problem is that when you open 3-7 documents in a activity 11 inches on the tablet, i get memory overflow. When you load a new document, all references to the previous document are destroyed, but the image of the document from memory are not removed. objects are created in the memory image of 10-12 megabytes. on tablet the size of 7 inches this problem does not arise.
也许有人遇到过这个问题?
Maybe someone encountered this problem?
推荐答案
此问题是通过调用解决循环()
在 relaeseBitmaps位图( )
PageView.java的方法
This problem is resolved by calling recycle()
on bitmap in relaeseBitmaps()
method of PageView.java
public void releaseBitmaps() {
reinit();
mEntireBm.recycle();
mPatchBm.recycle();
mEntireBm = null;
mPatchBm = null;
}
这篇关于内存不足的MuPdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!