Commit c5c8abd2 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed memory errors reported by Valgrind

parent 3e0925fe
...@@ -68,7 +68,7 @@ CpuGBVISoftcore::~CpuGBVISoftcore( ){ ...@@ -68,7 +68,7 @@ CpuGBVISoftcore::~CpuGBVISoftcore( ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
delete _switchDeriviative; delete[] _switchDeriviative;
//if( _gbviParameters != NULL ){ //if( _gbviParameters != NULL ){
// delete _gbviParameters; // delete _gbviParameters;
//} //}
......
...@@ -175,7 +175,8 @@ void testEnergyEthaneSwitchingFunction( int useSwitchingFunction ) { ...@@ -175,7 +175,8 @@ void testEnergyEthaneSwitchingFunction( int useSwitchingFunction ) {
for( int i = 0; i < numParticles; i++ ){ for( int i = 0; i < numParticles; i++ ){
system.addParticle(1.0); system.addParticle(1.0);
} }
LangevinIntegrator integrator(0, 0.1, 0.01); LangevinIntegrator integrator1(0, 0.1, 0.01);
LangevinIntegrator integrator2(0, 0.1, 0.01);
double C_HBondDistance = 0.1097; double C_HBondDistance = 0.1097;
double C_CBondDistance = 0.1504; double C_CBondDistance = 0.1504;
...@@ -280,8 +281,8 @@ void testEnergyEthaneSwitchingFunction( int useSwitchingFunction ) { ...@@ -280,8 +281,8 @@ void testEnergyEthaneSwitchingFunction( int useSwitchingFunction ) {
system.addForce(nonbonded); system.addForce(nonbonded);
Context referenceContext(system, integrator, referencePlatform); Context referenceContext(system, integrator1, referencePlatform);
Context context(system, integrator, platform); Context context(system, integrator2, platform);
vector<Vec3> positions(numParticles); vector<Vec3> positions(numParticles);
positions[0] = Vec3(0.5480, 1.7661, 0.0000); positions[0] = Vec3(0.5480, 1.7661, 0.0000);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment