1 person found this helpful
obviously if you are passing the reference of foalT to another function the original array will be modified, if you want a copy of the array to be modified and returned, then you have to clone it and send to the function. cloning example
in future if it happens to the objects then use ObjectUtil.clone
I thought functions where not supposed to alter the inputs unless they are returned? Flex doesn't work like that?
Flex does have some level of use of references, which you are experiencing in this case.
As the previous poster indicated, you need to clone the object in this case.
Thanks to both of you for the help.