diff options
author | Tim King <taking@cs.nyu.edu> | 2010-03-23 19:41:49 +0000 |
---|---|---|
committer | Tim King <taking@cs.nyu.edu> | 2010-03-23 19:41:49 +0000 |
commit | e11bce2790fa9e517e08ae5d3c477da651db3630 (patch) | |
tree | ffc4bb7cab3a6887c83fd3817c4cd79503d53a2c /src/expr/node.h | |
parent | 9576517676138a8ca2887a967f1b056662ef6754 (diff) |
Fixed some memory cleanup and destruction issues with ContextObj, ECData, CDList, and CDMap. Added the d_underTheShotgun field to NodeManager to keep track of which NodeValue is currently being deleted. If a Node or TNode has this node value, it can always be deleted. This avoids the need for introducing SoftNodes. Currently passes Debug and Production make check
Diffstat (limited to 'src/expr/node.h')
-rw-r--r-- | src/expr/node.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/expr/node.h b/src/expr/node.h index 25990cedf..f7cef5a4c 100644 --- a/src/expr/node.h +++ b/src/expr/node.h @@ -522,7 +522,9 @@ NodeTemplate<ref_count>::~NodeTemplate() throw(AssertionException) { if(ref_count) { d_nv->dec(); } - Assert(ref_count || d_nv->d_rc > 0, + Assert(ref_count || + d_nv->d_rc > 0 || + d_nv->isBeingDeleted(), "Temporary node pointing to an expired node"); } |