- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Potentials/PartialNucleiChargeFitter.cpp
rf60d95 r6b3e5e 227 227 PartialNucleiChargeFitter::~PartialNucleiChargeFitter() 228 228 { 229 delete PotentialFromCharges; 229 if (PartialCharges != NULL) 230 delete PartialCharges; 231 232 if (PotentialFromCharges != NULL) 233 delete PotentialFromCharges; 230 234 } 231 235 … … 235 239 const size_t rows = SampledPotential.getDimension(); 236 240 const size_t cols = positions.size(); 241 242 // allocate memory for PotentialFromCharges 243 if (PotentialFromCharges != NULL) { 244 delete PotentialFromCharges; 245 PotentialFromCharges = NULL; 246 } 237 247 PotentialFromCharges = new MatrixContent( rows, cols ); 238 248 // store step length per axis … … 285 295 { 286 296 // prepare PartialCharges 297 if (PartialCharges != NULL) { 298 delete PartialCharges; 299 PartialCharges = NULL; 300 } 287 301 PartialCharges = new VectorContent(positions.size()); 288 302
Note:
See TracChangeset
for help on using the changeset viewer.