// Duplicatation (preferred instead): public void copyTo(vec <T> copy) { copy.clear(); copy.growTo(sz); if (sz > 0) { Array.Copy(data, copy.data, sz); } }
public void moveTo(vec <T> dest) { dest.clear(); dest.data = data; dest.sz = sz; data = null; sz = 0; }