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

TOPIC:

Android PDFViewPager memory issues 6 years 8 months ago #12677

  • dancur
  • dancur's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
In our application, we are using the PDFViewPager class and are seeing some memory issues. We followed your design pattern from PDFPagerAct, but the memory usage in the Native memory stack grows every time you swipe to a new page. What settings need to be configured to make sure that memory is not leaking via JNI libraries?

In addition, several lines are commented out in the PDFViewPager class. Of particular interest is VPage's SetConfigure method. How is this method intended to be used? What effect does it have? Finally, how are the values CLIP_W and CLIP_H intended to be used, as they aren't defined anywhere else in the class. Thank you.

Daniel
The Washington Post

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

Android PDFViewPager memory issues 6 years 8 months ago #12680

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
You need to make sure that while navigating you are closing the unneeded pages (i.e. PDFPageAdapter.destroyItem is called) and setting ViewPager.setOffscreenPageLimit according to your needs.

Lines commented, belongs to non-implemented listeners, test codes or old codes..
VPage's SetConfigure --> old method that is replaced now with VPageRenderResult and blocks management. (zoom handling)

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

  • Page:
  • 1
Powered by Kunena Forum