The definition of Activity memory leak is that after the Activity is closed, whether there are other resident objects referencing the Activity object, causing the Activity object not to be recycled. From the information you gave, we can’t tell whether it will cause a memory leak, because you didn’t give whether mAnimator references Activity. You can directly check the reference chain of mAnimator. If there is a reference to the Activity object (for example, the View operated by ValueAnimator and the callback object of ValueAnimator may cause indirect references to the Activity), it will cause a memory leak.
You can use log to print logs. For example, write a log in the onDestroy method to see if it is called. Print the log in a loop in the activity to see if the log printing will stop after closing.
The definition of Activity memory leak is that after the Activity is closed, whether there are other resident objects referencing the Activity object, causing the Activity object not to be recycled.
From the information you gave, we can’t tell whether it will cause a memory leak, because you didn’t give whether mAnimator references Activity.
You can directly check the reference chain of mAnimator. If there is a reference to the Activity object (for example, the View operated by ValueAnimator and the callback object of ValueAnimator may cause indirect references to the Activity), it will cause a memory leak.
You can use log to print logs. For example, write a log in the onDestroy method to see if it is called. Print the log in a loop in the activity to see if the log printing will stop after closing.