Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

Out of memory when Searching

More
IP: 192.168.0.71 11 years 10 months ago #6914 by Chanwoo Park
Hi,

I'm using radaee premium license to develop Android app which has a searching function by keyword.

for (int i = 0; i < mDocument.GetPageCount(); i++) {

Page page = mDocument.GetPage(i);
page.ObjsStart();

Page.Finder m_finder = page.FindOpen(keyword, false, false);

for (int j = 0; j < m_finder.GetCount(); j++) {

//to do

}

m_finder.Close(); // I do this to prevent memory leak.

}


But when the number of page of a certain book goes beyond 300 pages (for example),
The application does the forced close due to memory issue.

What should I do more to prevent memory leak ??

Thanks in advance.
More
IP: 192.168.0.71 11 years 10 months ago - 11 years 10 months ago #6916 by radaee
Replied by radaee on topic Out of memory when Searching
codes like:
Code:
for (int i = 0; i < mDocument.GetPageCount(); i++) { Page page = mDocument.GetPage(i); page.ObjsStart(); Page.Finder m_finder = page.FindOpen(keyword, false, false); for (int j = 0; j < m_finder.GetCount(); j++) { //to do } m_finder.Close(); // I do this to prevent memory leak. page.Close(); //this is important as well. }
Last edit: 11 years 10 months ago by .
Time to create page: 0.385 seconds
Powered by Kunena Forum