Using clone() versus deepClone()

The AcRxObject::clone() function clones a single object. The AcDbObject::deepClone() function clones the object and any objects owned by that object. The deepClone() function also translates the cloned object's references.

In general, the deepClone() function is the safer of the two functions. If you are cloning a simple object such as an ellipse, the two functions may be equivalent. But if you are cloning a complex object such as a polyline, the clone() function isn't adequate because it clones only the polyline object. With the deepClone() function, you clone the polyline as well as its vertices.