Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10255

TCutG copy constructor is wrong

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • High
    • Resolution: Fixed
    • master
    • 6.20/00
    • Graphics
    • 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

      Attachments

        Activity

          People

            couet Olivier Couet
            slinev Serguei Linev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual End: