Commit 4adb638b authored by gsamain's avatar gsamain Committed by Xavier Thompson

Make reifying messages own a reference of hidden cyobjects

parent bbd74b14
......@@ -1316,6 +1316,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
# Acquire a ref on CyObject, as we don't know when the message will be processed
put_cypclass_op_on_narg_optarg(lambda _: "Cy_INCREF", reified_function_entry.type, Naming.optional_args_cname, code)
code.putln("Cy_INCREF(this->%s);" % target_object_cname)
code.putln("}")
code.putln("int activate() {")
code.putln("/* Activate only if its sync object agrees to do so */")
......
......@@ -99,7 +99,11 @@
ActhonMessageInterface(
ActhonSyncInterface* sync_method,
ActhonResultInterface* result_object
) : _sync_method(sync_method), _result(result_object) {}
) : _sync_method(sync_method), _result(result_object)
{
Cy_INCREF(this->_sync_method);
Cy_INCREF(this->_result);
}
};
struct ActhonQueueInterface : CyObject {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment