我在我的应用程序中使用活动组来显示选项卡。
每次我点击任何选项卡时,它的总内存使用量会增加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()销毁每个活动,但内存使用量仍在增加。
然后我尝试在每个子活动启动时从localActivityManager中销毁所有活动。但问题仍然存在。
我该如何解决这个问题?
请帮帮我...