summaryrefslogtreecommitdiffstats
path: root/include/framework/structure/ExtensionStructure.h
diff options
context:
space:
mode:
authorDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2023-10-31 12:41:55 -0400
committerDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2023-10-31 12:41:55 -0400
commit68ae6279476e7d37837ac06474fb558e50ce6706 (patch)
tree98789f86335627e80d295441b79d72a3acbf451b /include/framework/structure/ExtensionStructure.h
parentca729108869b4143f1eea31f6dde9195decfec9c (diff)
downloaddynamic-extension-68ae6279476e7d37837ac06474fb558e50ce6706.tar.gz
Fixes for various bugs under SerialScheduler
Diffstat (limited to 'include/framework/structure/ExtensionStructure.h')
-rw-r--r--include/framework/structure/ExtensionStructure.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/framework/structure/ExtensionStructure.h b/include/framework/structure/ExtensionStructure.h
index f5657af..80ec7b9 100644
--- a/include/framework/structure/ExtensionStructure.h
+++ b/include/framework/structure/ExtensionStructure.h
@@ -46,7 +46,8 @@ public:
* Create a shallow copy of this extension structure. The copy will share references to the
* same levels/shards as the original, but will have its own lists. As all of the shards are
* immutable (with the exception of deletes), the copy can be restructured with merges, etc.,
- * without affecting the original.
+ * without affecting the original. The copied structure will be returned with a reference
+ * count of 0; generally you will want to immediately call take_reference() on it.
*
* NOTE: When using tagged deletes, a delete of a record in the original structure will affect
* the copy, so long as the copy retains a reference to the same shard as the original. This could
@@ -59,6 +60,8 @@ public:
new_struct->m_levels.push_back(m_levels[i]->clone());
}
+ new_struct->m_refcnt = 0;
+
return new_struct;
}