dear all,
I don’t understand what’s wrong in this and why it’s wrong…
I’m allocating memory in this way
TH1F *h = new TH1F[1000];
and this is fine, but when I try to free the memory I get this error
delete h;
*** glibc detected *** free(): invalid pointer: 0xa5afa00c ***
Aborted
The strange thing is that if I allocate less memory
TH1F *h = new TH1F[10];
delete h;
it works without any error.
who can help me?
thank a lot
roberto