If I have a si singleton called global
[Updated]
I think I just found a bug.
so try this
var mylocalvar = [1,2,3]
global.myglobalvar = mylocalvar
mylocalvar = []
print(global.myglobalvar)
this will print([1,2,3])
but if you do:
var mylocalvar = [1,2,3]
global.myglobalvar = mylocalvar
mylocalvar.clear()
print(global.myglobalvar)
this will print([])