In the below code, when I change orientation of the device, I am still getting previous values of variable "count", along with a new counter for "count", what could I derive from this behaviour? **Is the TimerTask holding reference of "count" variable ?**

```
public class MainActivity extends AppCompatActivity {

private int count;
private TimerTask timerTask;
private Timer timer;

 @Override
 protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    timerTask = new MyTimerTask();
    timer = new Timer(true);
    //running timer task as daemon thread
    timer.scheduleAtFixedRate(timerTask, 0, 1000);
 }

 class MyTimerTask extends TimerTask {

    @Override
    public void run() {
        count++;
        System.out.println("*** " + count + " ***");
    }
 }
}

```

[![enter image description here](https://i.stack.imgur.com/Yrt9Z.png)](https://i.stack.imgur.com/Yrt9Z.png)