Skip to content
Snippets Groups Projects
Commit 26a4ae96 authored by Rene Brun's avatar Rene Brun
Browse files

Move function Track::Clear from Event.h to Event.cxx.

Track::Clear calls TBits::Clear, fixing a memory leak problem when writing.


git-svn-id: http://root.cern.ch/svn/root/trunk@7849 27541ba8-7e3a-0410-8455-c3a389f83636
parent 05c9d208
No related branches found
No related tags found
No related merge requests found
// @(#)root/test:$Name: $:$Id: Event.cxx,v 1.22 2003/08/23 00:08:13 rdm Exp $
// @(#)root/test:$Name: $:$Id: Event.cxx,v 1.23 2003/12/27 16:13:48 brun Exp $
// Author: Rene Brun 19/08/96
////////////////////////////////////////////////////////////////////////
......@@ -334,6 +334,14 @@ Track::Track(Float_t random) : TObject(),fTriggerBits(64)
fValid = Int_t(0.6+gRandom->Rndm(1));
}
//______________________________________________________________________________
void Track::Clear(Option_t * /*option*/)
{
fTriggerBits.Clear();
delete [] fPointValue;
fPointValue=0;
}
//______________________________________________________________________________
HistogramManager::HistogramManager(TDirectory *dir)
{
......
......@@ -49,7 +49,7 @@ public:
Track(const Track& orig);
Track(Float_t random);
virtual ~Track() {Clear();}
void Clear(Option_t *option="") { delete [] fPointValue; fPointValue=0; }
void Clear(Option_t *option="");
Float_t GetPx() const { return fPx; }
Float_t GetPy() const { return fPy; }
Float_t GetPz() const { return fPz; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment