Details
-
Bug
-
Status: Closed (View Workflow)
-
High
-
Resolution: Fixed
-
master
-
None
-
Linux 64 bit
Description
While assigned objects are owned by TCutG, existing copy constructor with simple copy of objects pointers are wrong. Simple reproducer:
// code placeholder
|
{
|
TCutG v1;
|
v1.SetObjectX(new TNamed("xx","bb")); |
v1.SetObjectY(new TNamed("yy","bb")); |
TCutG v2(v1);
|
}
|
Probably, one should forbid copy constructor at all, while normally TCutG object must be registered in the global list of specials, but copy constructor does not do this.
Opposite problem is with assign operator.
It will be fixed in https://github.com/root-project/root/pull/4151