summaryrefslogtreecommitdiff
path: root/src/context/context.h
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2010-03-23 19:41:49 +0000
committerTim King <taking@cs.nyu.edu>2010-03-23 19:41:49 +0000
commite11bce2790fa9e517e08ae5d3c477da651db3630 (patch)
treeffc4bb7cab3a6887c83fd3817c4cd79503d53a2c /src/context/context.h
parent9576517676138a8ca2887a967f1b056662ef6754 (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/context/context.h')
-rw-r--r--src/context/context.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/context/context.h b/src/context/context.h
index 6b9f9fd6d..87e4e5fa1 100644
--- a/src/context/context.h
+++ b/src/context/context.h
@@ -399,7 +399,7 @@ public:
/**
* Destructor does nothing: subclass must explicitly call destroy() instead.
*/
- virtual ~ContextObj() {}
+ virtual ~ContextObj() { Debug("contextgc") << "context obj dest" << std::endl; }
/**
* If you want to allocate a ContextObj object on the heap, use this
@@ -426,6 +426,7 @@ public:
* ContextMemoryManager as an argument.
*/
void deleteSelf() {
+ this->~ContextObj();
::operator delete(this);
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback