Android: Order of statements in onDestroy() method
I开发者_如何学Gof 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.
精彩评论