If the array contains only string or numeric values, it is enough to make a βshallowβ copy, as described by Adam and Retterberg.
If the array contains other arrays or objects / instances of classes, etc., then you should make a deep copy if you need all the objects inside to be unique, not just links. You can achieve this with:
var ba:ByteArray = new ByteArray(); ba.writeObject(a);
It is also useful for copying objects that do not have any concat or splice methods.
source share