class Holder { weak uint[] idx; public Holder.copy(Holder src, uint[] idx) { this.idx = idx; } } class Geometry { uint[] idx; Holder[] holders; Geometry.copy(Geometry src) { this.holders = new Holder[src.holders.length]; uint i=0U; foreach(weak Holder holder in this.holders) this.holders[i++] = new Holder.copy(holder, this.idx); } }