but don't you store the ref in the array together with the corresponding var? then it shouldn't get lost?