[ 
https://issues.apache.org/jira/browse/WEEX-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16534392#comment-16534392
 ] 

weifengsmile commented on WEEX-491:
-----------------------------------

[~xyyxyy1234] Thanks for your reply, I have executed force gc after the 
activity popped by navigator, but the Native memory didn't reduced.

Then I checked the memory info by Android profiler in Android Studio. The 
result was that there were lots of bitmap not released in heap memory. And the 
bitmap is from many pictures in the activity loaded from network.

The problem was that the bitmap memory wasn't released after the activity 
popped and so I guess if it is an issue of memory leak in weexSDK of Android. 
If app user pushes as many as activities no matter how many activities he pops, 
the app heap memory will increase all the time util system kills it for memory 
not enough.

If it is not an issue of weexSDK, what can I do in this scenario to promise app 
not crash for memory problem? For example, can I do something to release all 
bitmap memory of images manually in the lifecycle of activity such as 
"onDestroy"?

Look forward to your guidance, thank you very much!

> navigator 是否能增加清除页面栈的方法?
> ------------------------
>
>                 Key: WEEX-491
>                 URL: https://issues.apache.org/jira/browse/WEEX-491
>             Project: Weex
>          Issue Type: Wish
>          Components: Android, iOS
>            Reporter: weifengsmile
>            Assignee: codefurture
>            Priority: Major
>              Labels: easyfix
>
> 目前的navigator模块,做跳转时只能push,pop,open或close,并不能清除之前的页面栈,所以能不能增加这个功能,否则在某些场景,页面可能被无限push导致堆栈内存占用不断增加最终OOM
> 或者说,目前有什么方案可以解决这个问题吗?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to