From dff327351eb8642931e7d7b328224e29a9133eca Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 12 Aug 2013 10:56:32 -0400 Subject: CarpetLib: Correct memory allocation error in communication buffers --- Carpet/CarpetLib/src/commstate.cc | 5 +++++ 1 file changed, 5 insertions(+) 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