我在我的应用程序中使用活动组来显示选项卡。
每次单击任何选项卡时,其总内存使用量都会增加 1 MB。而且,如果我再次进入该选项卡中的任何内部活动,它的内存使用量会再次增加。
我getLocalActivityManager()
用来开始活动。
//argIntent this is my intent
//argActivityId is the id ot activity
argIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
// the id is stored in an arraylist
int intListSize = arlstGroup.size();
arlstGroup.add(intListSize, argActivityId);
Window objWindow = getLocalActivityManager().startActivity(argActivityId, argIntent);
View objView = objWindow.getDecorView();
setContentView(objView);
而且我正在使用 destroyActivity() 来销毁每个活动,但内存使用量仍在增加。
然后我尝试在每个子活动开始时从 localActivityManger 销毁所有活动。但问题仍然存在。
我怎么解决这个问题?
请帮我...