# Importance of the clone( ) method

**URL:** <https://verificationacademy.com/forums/t/importance-of-the-clone-method/25472>\
**Category:** OVM\
**Tags:** OVM\
**Created:** [March 28, 2008, 11:34am UTC](https://verificationacademy.com/forums/t/importance-of-the-clone-method/25472 "2008-03-28T11:34:52Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [December 30, 2019, 11:49pm UTC](https://verificationacademy.com/forums/t/importance-of-the-clone-method/25472/16 "2019-12-30T23:49:03Z")

</div>

_In reply to [svq](https://verificationacademy.com/forums/t/importance-of-the-clone-method/25472/16):_

Unfortunately, the UVM is much more complicated than it needs to be due to its history. It is expecting that everyone is using the macros to register the class with the factory. You are not supposed to override clone() or copy(), so it really doesn’t matter if they are virtual or not in that case.

uvm\_object::clone() calls the virtual create() method that get inserted by the [`uvm\_object\_utils](https://verificationacademy.com/forums/uvm/uvm-utility-macros#reply-68981) macro in each derived class. There is no do\_clone() method; the create() method is taking the place of that.

You are correct about do\_copy(). After calling create(), uvm\_object::clone(), calls uvm\_object::copy, which then calls the virtual do\_copy().

---

_[View the full topic](https://verificationacademy.com/forums/t/importance-of-the-clone-method/25472)._
