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 using viewpager

More
10 years 1 month ago #10212 by vitorpradoveri
I've bought the license to use Radaee in Android app.
I need to setup the pdf using a ViewPager, I found the example in RDPDFReader..
But the PDFViewPager throws an out of memory exception after some pages.

I was looking into PDFViewPager implementation and I found an array with the pages, and it's never released by GC.
maybe this is the problem.. I really don't know how can i solve this. I need to implement my own viewpager with my own adapter?
More
10 years 1 month ago #10217 by Davide
Hi,
can you reproduce this issue with all the pdfs? Can you please send us one of your pdfs to test it..

I invite you to open a new ticket bout that issue here: www.radaeepdf.com/support/tickets
More
10 years 2 weeks ago #10364 by alolip
Is there a solution for this issue?
I'm having it too,
seems like objects are never released
More
10 years 2 weeks ago #10366 by radaee
hi, u maybe using old version.
plz check codes for PDFViewPager class, there are implment codes for PagerAdapter:
Code:
private class PDFPageAdapter extends PagerAdapter { private Document m_doc; public PDFPageAdapter(Context ctx, Document doc) { m_thread = new VThread(m_hand_ui); m_thread.start(); m_thread_cache = new VThread(m_hand_ui); m_thread_cache.start(); int cnt = doc.GetPageCount(); m_pages = new PDFPageView[cnt]; m_doc = doc; int cur; for(cur = 0; cur < cnt; cur++) { m_pages[cur] = new PDFPageView(ctx); //m_pages[cur].vOpen(m_thread, m_thread_cache, doc, cur, m_fit_type); } } @Override public java.lang.Object instantiateItem(android.view.ViewGroup container, int position) { if(!m_pages[position].vIsOpened())//lazy loading. m_pages[position].vOpen(m_thread, m_thread_cache, m_doc, position, m_fit_type); container.addView(m_pages[position]); return m_pages[position]; } @Override public int getCount() { return m_pages.length; } @Override public void destroyItem(ViewGroup container, int position, Object object) { m_pages[position].vFreeCache(); container.removeView(m_pages[position]); } @Override public boolean isViewFromObject(View view, Object o) { return view == o; } @Override public CharSequence getPageTitle(int position) { return "Page:" + position; } }
callback method destroyItem shall free memories.
More
IP: 192.168.0.71 10 years 2 weeks ago #10367 by alolip
Is there a solution for this issue?
I'm having it too,
seems like objects are never released
More
9 years 10 months ago #10563 by thiagopelikan
Same here!
Time to create page: 0.385 seconds
Powered by Kunena Forum