문제

If I override my main Activity's onDestroy() method in order to recycle a bitmap when the screen is rotated, should I call super.onDestroy() before or after myBitmap.recycle()? Does it matter?

도움이 되었습니까?

해결책

Order does not matter. The base implementation of onDestroy() does nothing except make you you have called it. Some derived classes (such as ListActivity) may do something, but as long as you don't try to use any of their state after you call the derived class you will be fine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top