In python suppose one does the following:

```
# var is a variable, ClassName is the name of a class

var = ClassName(<params...>) # instatiate class to var 
var = ClassName(<params...>) # reset variable to new instance

# or in loop

while 1:
    var = ClassName(<params...>)
    # use var ...

```

My question is, when does the previous instance get garbage collected?
Does it happen before or after the next instance is created?