aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-08-06 12:57:55 -0400
committerErik Schnetter <schnetter@gmail.com>2013-08-06 13:11:12 -0400
commitea740d6943d91904e50c22bf40112b9f597c69e8 (patch)
treedbaf591c8d53a3db2559fb5aebfa87b7f4559ef1
parent1208584f656f4af6a0b3d511882f77727f4638f3 (diff)
CarpetLib: Ensure that gh/dh/th destructors are called in the right order
-rw-r--r--Carpet/CarpetLib/src/gh.cc2
-rw-r--r--Carpet/CarpetLib/src/gh.hh2
2 files changed, 3 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/gh.cc b/Carpet/CarpetLib/src/gh.cc
index 5c13d0b6a..a82d66a09 100644
--- a/Carpet/CarpetLib/src/gh.cc
+++ b/Carpet/CarpetLib/src/gh.cc
@@ -77,6 +77,8 @@ gh (vector<ivect> const & reffacts_, centering const refcent_,
gh::
~gh ()
{
+ assert (dhs.empty());
+ assert (ths.empty());
allgh.erase (this);
}
diff --git a/Carpet/CarpetLib/src/gh.hh b/Carpet/CarpetLib/src/gh.hh
index 8c59c7073..c6462e51c 100644
--- a/Carpet/CarpetLib/src/gh.hh
+++ b/Carpet/CarpetLib/src/gh.hh
@@ -63,8 +63,8 @@ public:
mregs regions; // extents and properties of all grids
mregs oldregions; // extents and properties of all grids
- set<th*> ths; // all time hierarchies
set<dh*> dhs; // all data hierarchies
+ set<th*> ths; // all time hierarchies
public: