diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-03-08 23:49:47 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-03-08 23:49:47 +0000 |
commit | cf4d347cbbbb4c1a1e1db99337cfd2b22b84b756 (patch) | |
tree | ceea43e3d37525038bed10b115c73a8aa08ce68d /src/context | |
parent | de0160112edbed8ce9b62bf87172ae2f0e99a013 (diff) |
This fixes regressions at levels >= 1 which were failing
* implement zombification and garbage collection of NodeValues
(but GC not turned on yet)
* implement removal of key nodes from all attribute tables
* audit NodeBuilder and fix memory leaks and improper reference-count
management. This is in many places a re-write. Clearly documented
invariants on NodeBuilder state. (Closes Bug 38)
* created a "BackedNodeBuilder" that can be used to construct
NodeBuilders with a stack-based backing store for a size that's not
a compile-time constant.
* NodeValues no longer depend on Node for toStream()'ing
* make unit test-building "silent" with --enable-silent-rules
* (Makefile.am, Makefile.builds.in) fix top-level build system so that
"make regressN" works with unbuilt/out-of-date source trees in the
expected way.
* (various) code cleanup, documentation, formatting
Diffstat (limited to 'src/context')
-rw-r--r-- | src/context/cdmap.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/context/cdmap.h b/src/context/cdmap.h index 994ff76b4..dc3448e52 100644 --- a/src/context/cdmap.h +++ b/src/context/cdmap.h @@ -244,16 +244,17 @@ public: emptyTrash(); typename __gnu_cxx::hash_map<Key, CDOmap<Key, Data, HashFcn>*, HashFcn>::iterator - i(d_map.find(k)); + i = d_map.find(k); - if(i == d_map.end()) { // Create new object + if(i == d_map.end()) {// create new object CDOmap<Key, Data, HashFcn>* - obj(new(true) CDOmap<Key, Data, HashFcn>(d_context, this, k, d)); + obj = new(true) CDOmap<Key, Data, HashFcn>(d_context, this, k, d); d_map[k] = obj; } else { (*i).second->set(d); } } + // FIXME: no erase(), too much hassle to implement efficiently... // Iterator for CDMap: points to pair<const Key, CDOMap<Key, Data, HashFcn>&>; |