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

TCutG copy constructor is wrong

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: master
    • Fix Version/s: 6.20/00
    • Component/s: Graphics
    • Labels:
      None
    • Environment:

      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

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

              Dates

              • Created:
                Updated:
                Resolved:
                Actual End: