Differences in behaviour between Record Lists and other type values

The majority of Service Studio types are passed around by value, which means that when you assign (for example) an Integer variable to another, the value gets copied over: any later changes to any of these variables will not influence the value on the other.

The Record Lists, however, are passed by reference, which means that assigning a Record List variable to another will effectively leave both pointing to the same place in memory. This means that changes made to one of the variables will show up in the other. Likewise, as you cannot iterate again over a Record List while you are still iterating over it, having two variables pointing to the same place will still force you to abide by this limitation. This by reference operation applies, not only to assign operations via the Assign node, but less obviously also to parameter passing (i.e. if you pass a Record List into an Action and that action changes it, the variable in the caller will be changed too).

In the event that you really need distinct copies of the data, you should use the ListDuplicate Built-in Action to produce a totally different instance.

For completeness sake it should be pointed here that the only other type also passed by reference is Binary Data.

What about structure lists?