Greetings all. When a struct contains an object (instead of a pointer), it seems that an array of these structs generates a segfault when being deallocated. If I make a program foo.C:
[code]struct mystruct {
TH2F h1;
TH2F h2;
};
void foo() {
mystruct a;
mystruct b[2];
}[/code]
and execute with “.x foo.C”, there are no problems with a, but when the array b is being destroyed it generates this error message:
!!!Calling destructor 0xc048810.~mystruct() for b ary1:link0
0xc048cf0.~mystruct()
!!!Calling class member destructor ~TH2F()
*** Break *** segmentation violation
I don’t see this problem with ACLiC, so I assume it is with cint. I have tested this with ROOT versions 4.04/02 (cint version 5.15.169) and 4.00/04 (cint 5.15.133) and get the same result.
I apologize if this has already been reported or addressed.
Thanks.