Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Out of memory when Searching 9 years 8 months ago #6914

  • Chanwoo Park
  • Chanwoo Park's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • 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 9 years 8 months ago #6916

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
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