summaryrefslogtreecommitdiffstats
path: root/src/server/GraphImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/GraphImpl.cpp')
-rw-r--r--src/server/GraphImpl.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp
index bdd0a69a..c1ee6a2b 100644
--- a/src/server/GraphImpl.cpp
+++ b/src/server/GraphImpl.cpp
@@ -297,14 +297,15 @@ GraphImpl::has_arc(const PortImpl* tail, const PortImpl* dst_port) const
return (i != _arcs.end());
}
-void
-GraphImpl::set_compiled_graph(CompiledGraph* cg)
+CompiledGraph*
+GraphImpl::swap_compiled_graph(CompiledGraph* cg)
{
- if (_compiled_graph && _compiled_graph != cg) {
- _engine.maid()->dispose(_compiled_graph);
+ CompiledGraph* const old = _compiled_graph;
+ if (old && cg != old) {
_engine.reset_load();
}
_compiled_graph = cg;
+ return old;
}
uint32_t