Clone object

Dear ROOTers,

I observed weird behaviour, let’s say I have a class with int field, now, if I have only one constructor:

MyClass(){field=-1}

clone works as it should but with this

MyClass(int field=-1){this->field = field;}

all clones objects have field = -1. Is the constructor with default argument somehow affecting clone procedure?

What code do you use to clone?

Hi, actuall I found a bug in my code. In simplified example clongin works. So it was my mistake.