const char* receive_block =
"if (parcel_received == IntPtr.Zero)\n" \
"{\n" \
+ " Interop.LibRPCPort.Parcel.Destroy(p);\n" \
" throw new InvalidProtocolException();\n" \
"}\n";
stream << AddIndent(TAB_SIZE * 4, receive_block) << NLine(1);
if (ret != Interop.LibRPCPort.ErrorCode.None)
return -1;
- Interop.LibRPCPort.Parcel.Create(out IntPtr result);
- Interop.LibRPCPort.Parcel.ReadInt32(p, out int cmd);
ServiceBase b = null;
foreach (var i in _services)
}
if (b == null)
+ {
+ Interop.LibRPCPort.Parcel.Destroy(p);
return -1;
+ }
+
+ Interop.LibRPCPort.Parcel.Create(out IntPtr result);
+ Interop.LibRPCPort.Parcel.ReadInt32(p, out int cmd);
switch ((MethodId)cmd)
{
const char CB_ON_RECEIVED_EVENT_BACK[] =
R"__cs_cb(
default:
+ Interop.LibRPCPort.Parcel.Destroy(p);
+ Interop.LibRPCPort.Parcel.Destroy(result);
return -1;
}