4 ms·
Im mostly experienced with the Lua Reference handling, so beware. Usually there is one global hash-table, and a local hash table. Everything (every function, e
by Pica_soO 10y ago
Im mostly experienced with the Lua Reference handling, so beware.
Usually there is one global hash-table, and a local hash table. Everything (every function, every object, every string is stored once, depending on the calling situation.
So passing a reference to a object is passing the reference to that one global object, until you change it, or make a local copy of it.
That sounds really strange and in a way is it. It also means, that your list of objects, will not contain duplicates. It means no useless work is done to copy data.
The model involved borrows basically from the concept of lazy loading and flat copys. Do work only when needed.
Super difficult to explain to new users without CS background.