diff options
author | Erik Schnetter <schnetter@aei.mpg.de> | 2005-07-16 14:09:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@aei.mpg.de> | 2005-07-16 14:09:00 +0000 |
commit | 69868c2c708c969677244e39896564241452275b (patch) | |
tree | 22a2a065270901cf0a12afe57186c041314dc02d /Carpet/CarpetInterp | |
parent | b5c30b6602d1dd5dba45c616841ab06504c22fa8 (diff) |
CarpetInterp: Plug memory leak in the recent function breakup
darcs-hash:20050716140952-891bb-c7665e3f4b371287f54cfc167140719ce54120b8.gz
Diffstat (limited to 'Carpet/CarpetInterp')
-rw-r--r-- | Carpet/CarpetInterp/src/interp.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc index e9d187be7..3f8105c10 100644 --- a/Carpet/CarpetInterp/src/interp.cc +++ b/Carpet/CarpetInterp/src/interp.cc @@ -524,6 +524,22 @@ namespace CarpetInterp { + // Free coordinate patches + for (int p=0; p<nprocs; ++p) { + for (int rl=minrl; rl<maxrl; ++rl) { + for (int m=0; m<maps; ++m) { + for (int c=0; c<vhh.at(m)->components(rl); ++c) { + delete allmaps.at(ind_prc(p,m,rl,c)); + allmaps.at(ind_prc(p,m,rl,c)) = NULL; + delete allcoords.at(ind_prc(p,m,rl,c)); + allcoords.at(ind_prc(p,m,rl,c)) = NULL; + } + } + } + } + + + transfer_output_patches_back (cgh, nprocs, minrl, maxrl, |