If I have infinite animation in activity and navigate away from activity, does it causes memory leak? Do I have to stop animation explicitly or is it somehow managed on framework level? What I mean by infinite animation:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false"
android:repeatCount="infinite">
<rotate
android:duration="1000"
android:interpolator="@android:anim/linear_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:repeatMode="restart"
android:toDegrees="360" />
From developers webpage :
You should usually use the onPause() callback to: Stop animations or other ongoing actions that could consume CPU.
Source : http://developer.android.com/training/basics/activity-lifecycle/pausing.html#Pause
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With