With the way the garbage collector works you should be able to delete the instance by simply doing obs = obs[..maxob + 1] .
In fact you can do everything that whole piece of code does like this.
In fact you can do everything that whole piece of code does like this.
maxob:-1 obs = obs[1.. ]