Fork me on GitHub

Ticket #47: delphes-memleak.patch

File delphes-memleak.patch, 1.4 KB (added by Sourav Mandal, 12 years ago)
  • interface/PdgParticle.h

    diff -urN Delphes_V_2.0.1/interface/PdgParticle.h Delphes_V_2.0.1-memleak/interface/PdgParticle.h
    old new  
    4444        PdgParticle(const long int pid, const std::string& name, const float m, const float q, const float gamma, const float ctau);
    4545        PdgParticle(const PdgParticle& p);
    4646        PdgParticle& operator=(const PdgParticle& p);
    47         ~PdgParticle() {};
     47        virtual ~PdgParticle() {};
    4848        long int pid() const {return _pid;};
    4949        float mass() const {return _mass;};
    5050        float charge() const {return _charge;};
     
    6868        PdgTable(){};
    6969        PdgTable(const PdgTable& table);
    7070        PdgTable& operator=(const PdgTable& table);
    71         ~PdgTable(){};
     71    virtual ~PdgTable(){};
    7272        void insert(const long int pid, const PdgParticle &p);
    7373        void print() const;
    7474        PdgParticle operator[](const int pid) const;
  • src/HepMCConverter.cc

    diff -urN Delphes_V_2.0.1/src/HepMCConverter.cc Delphes_V_2.0.1-memleak/src/HepMCConverter.cc
    old new  
    5858{
    5959
    6060 unsigned int particle_counter=0;
     61 index_to_particle.clear();
     62 particle_to_index.clear();
    6163 index_to_particle.reserve(evt->particles_size());
    6264 index_to_particle[0] = 0;
    6365 HepMC::GenEvent::vertex_const_iterator v;