I wanted to have a list of histogram pointers (to be filled later), and CINT has problems parsing it. I have the following script:
{
TH1D* a1;
TH1D* b2;
TH1D* c3, d4, e5;
delete a1;
delete b2;
delete c3;
delete d4;
delete e5;
}
When I execute it (with Trace on), I get:
root [1] .x test2
{
2 TH1D* a a1;
3 TH1D* b b2;
4 TH1D* c c3, d4,
!!!Calling default constructor 0xffffffff.TH1D() for declaration of d4 e5;
!!!Calling default constructor 0xffffffff.TH1D() for declaration of e5
5
6 delete a1;
!!!Calling destructor 0x1.~TH1D() for a1
7 delete b2;
!!!Calling destructor 0x1.~TH1D() for b2
8 delete c3;
!!!Calling destructor 0x1.~TH1D() for c3
9 delete d4;Error: d4 cannot delete FILE:test2 LINE:9
!!!Calling destructor 0x8e47538.~TH1D() for e5 ary0:link-1
!!!Calling destructor 0x8e47218.~TH1D() for d4 ary0:link-1*** Interpreter error recovered ***
Is this a documented feature, that I overlooked? I just lost a weekend trying to figure out where the segmentation fault was coming from. (I could reproduce the problem both on the Linux Redhat computer and my Mac OSX laptop.)