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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -