android - Rising memory usage after start new activities -
similar case this question, app uses multiple activities display different sections. sliding menu's button, can switch 1 activity another. codes follow:
intent intent = new intent(getapplicationcontext(), activitya.class); startactivity(intent); finish();
similar other menu buttons, switch activity b, c , d. when switch b, memory usage 30mb; switch b c, memory usage 35mb; switch c d, memory usage 40mb; switch d a, memory usage 45mb.
when click "force gc" in android studio, memory usage drops 5 10mb only. how can stop memory usage increasing non-stop ?
last, here androidmanifest.xml
:
<activity android:name=".activitya" android:screenorientation="portrait"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name=".activityb" android:screenorientation="portrait" android:theme="@style/apptheme.noactionbar" /> <activity android:name=".activityc" android:screenorientation="portrait" android:theme="@style/apptheme.noactionbar" /> <activity android:name=".activityd" android:screenorientation="portrait" android:theme="@style/apptheme.noactionbar" />
please advise. thanks.
Comments
Post a Comment