tags:

views:

425

answers:

1

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?

+4  A: 

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.

hackbod