This is quite specific topic related to S Pen Library. However any Android developer can help with this.
I am working with S Pen library and trying to create PDF from .spd file.
For that I am using
SpenCapturePage spenCapturePage = new SpenCapturePage(mContext);
spenCapturePage.setPageDoc(spenPageDoc);
capturedBitmap = spenCapturePage.capturePage(1f);
spenCapturePage.close();
Now here is the twik whenever I am spenCapturePage.setPageDoc(spenPageDoc);
method and if i dont use close()
method, I can see a hike from 9MB to 35MB in Android Profiler.
But In case of close()
which Ideally should clear out the object. yet I can see 22MB in Android profiler. which Ideally(without this code) is again back to 9MB.
Furthermore it increase for each page. (In my case it more then 20 pages per file)
So if someone know where I am wrong. please help me out.
For reference Samsung S Pen Library API Documentation ,
Adding more into it. just for general Android developer.
SPD is a file which replicate a book by Samsung.
SpenNoteDoc is a class which holds a complete book.
SpenPageDoc is a class which holds an individual page from SpenNoteDoc.