Fork me on GitHub

Changeset 232 in svn


Ignore:
Timestamp:
Feb 3, 2009, 2:00:59 PM (16 years ago)
Author:
Xavier Rouby
Message:

memory leak in constructors removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/Hector/src/H_RomanPot.cc

    r216 r232  
    2828                type = RP;
    2929                init();
    30                 H_RectangularAperture* rapp = new H_RectangularAperture(app,RP_HEIGHT,0,0);
    31                 setAperture(rapp);
     30                if(element_aperture) delete element_aperture;
     31                element_aperture = new H_RectangularAperture(app,RP_HEIGHT,0,0);
    3232}
    3333
     
    3535                type = RP;
    3636                init();
    37                 H_RectangularAperture* rapp = new H_RectangularAperture(app,RP_HEIGHT,0,0);
    38                 setAperture(rapp);
     37                if(element_aperture) delete element_aperture;
     38                element_aperture = new H_RectangularAperture(app,RP_HEIGHT,0,0);
    3939}
    4040
Note: See TracChangeset for help on using the changeset viewer.