android ndk - strange OutOfMemory error without memory leak -
i'm working @ pdf reader app using native library mupdf. unfortunately i'm encountering oom error after lot of swiping through pages. i'm using following code insights in memory behavior (i've used android device monitor before):
runtime.getruntime().totalmemory() // amount of allocated memory in app heap debug.getnativeheapallocatedsize() // amount of allocated memory in native heap
now comes strange thing...due swiping through pages returned values of these methods stable, doesn't there memory leak @ all. after time oom error occurs although values of these 2 methods still @ beginning.
does know happening here?
you can try prevent outofmemoryerror
occurring adding in application tag in appmanifest.xml
:
android:largeheap="true"
Comments
Post a Comment