You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The local object is backed up before entering a loop, and restored after the end of the loop. Therefore, any changes done to the local object inside the loop should not propagate.
In this case, local.x.value becomes 5, due to the fact that the backup is done using shallow copy in order to favor performance.
An option should be added, such that deep cloning is used instead. Of course, this may lead to a significant performance drop, but it's still good to have such an option available in case it is needed.
The text was updated successfully, but these errors were encountered:
The
local
object is backed up before entering a loop, and restored after the end of the loop. Therefore, any changes done to thelocal
object inside the loop should not propagate.The
local
object remains unchanged after the loop. However, not in this case:In this case,
local.x.value
becomes 5, due to the fact that the backup is done using shallow copy in order to favor performance.An option should be added, such that deep cloning is used instead. Of course, this may lead to a significant performance drop, but it's still good to have such an option available in case it is needed.
The text was updated successfully, but these errors were encountered: