I am really new to Android development and I have read article about Avoiding Memory Leaks on Android platform. I am not sure, if my following code...
public class TransactionDetailActivity extends Activity {
private Transaction transaction;
private TextView tvDetail; //static reference
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.screen_transaction_detail);
tvDetail = (TextView) findViewById(R.id.detail); //init of reference
}
Can this storing into static reference cause any memory leaks after screen rotation on switching other Activities? If YES, how can I avoid it?
Thanks a lot for any help!!!