[ROOT] Warning in <TH1::Build>: Replacing existing histogram: h (Potential memory leak).

From: Venkatesh Kaushik (venkat@hepmail.uta.edu)
Date: Wed Oct 29 2003 - 15:48:34 MET


HI ROOTERS,
I have a question regarding histograms.
I am getting the above warning every time i compile..
How do I get rid of it ?

Thanks for the help.
Venkat.

   Here's what I do.

  /*******************************************/
   const int num_hist = 7;
   ...
   ..
   TH1F *hprof[num_hist];

   Int_t Bins[] = { 35, 25, 104, 104, 104, 72, 120};
   Double_t Xmin[] = {-0.5, -0.5, -0.1, -0.1, -0.1, -0.1, -0.1 };
   Double_t Xmax[] = {34.5, 24.5, 0.51, 0.51, 0.51, 0.71, 1.1  };

   for(Int_t j = 0; j < num_hist; j++) {
         hprof[j] = new TH1F("h","",Bins[j],Xmin[j],Xmax[j]);
	  ... more code here ..
   }

  /*************************************/



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET