Out of memory when Searching - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: Out of memory when Searching

Out of memory when Searching 4 years 3 months ago #6914

  • Chanwoo Park
  • Chanwoo Park's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Karma: 1
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

Out of memory when Searching 4 years 3 months ago #6916

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
codes like:
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.
}

Please Log in or Create an account to join the conversation.

Last edit: by .
  • Page:
  • 1
Powered by Kunena Forum