|
Adrien de Croy <adrien@qbik.com> writes: In which case, separate functions will need to be written to deep-copy objects... you end up with code like deepcopy(var1, var2); or maybe var1.Assign(var2); instead of var1 = var2; My thought after reading this thread was: var1 = var2:Duplicate(); or var1 = var2:Copy() I do this in some of my Lua code and it works pretty well. I find it makes it pretty easy to tell when a new resource is allocated vs. simply referenced in a new way. Of course what's clear to me, may be mud to others... James. |