wwUtils::CopyObject

Creates a copy of an object by creating a brand new object and copying all properties including all nested objects from scratch.

This function creates a brand new object that has no reference whatsoever to the object that was passed in. All data is copied and recreated. Any surrogate object properties are also recreated from scratch resulting in a new object that is independent of any previous references.

1 Dimensional arrays and 1D arrays containing objects are also supported and generate new instances for each array element.

CopyObject(loInput)

Return Value

New Object reference

Parameters

loInput
Object that is to be copied. Any child objects are also copied and assigned to child object properties.

Remarks

Arrays are supported only 1 dimensionally.


See also:

Library wwUtils

© West Wind Technologies, 1996-2018 • Updated: 01/11/16
Comment or report problem with topic