diff options
Diffstat (limited to 'Carpet/CarpetLib/src/commstate.cc')
-rw-r--r-- | Carpet/CarpetLib/src/commstate.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/commstate.cc b/Carpet/CarpetLib/src/commstate.cc index 08b3724db..532461db7 100644 --- a/Carpet/CarpetLib/src/commstate.cc +++ b/Carpet/CarpetLib/src/commstate.cc @@ -531,6 +531,11 @@ comm_state::~comm_state () { DECLARE_CCTK_PARAMETERS; + // Note: calling resize(0) instead of clear() ensures that the + // vector capacity does not change + srequests.resize(0); + rrequests.resize(0); + for (size_t type=0; type<typebufs.size(); ++type) { typebufdesc& typebuf = typebufs.AT(type); for (size_t proc=0; proc<typebuf.procbufs.size(); ++proc) { |