竞技场::创建和竞技场之间的区别:: createMayBemessage
当我将协议缓冲区与竞技场一起使用时,这两个功能
google::protobuf::Arena::CreateMaybeMessage<LPD::MyObj>();
和
google::protobuf::Arena::CreateMessage<LPD::MyObj>();
When I using Protocol Buffer with Arena, what is the difference between those 2 functions
google::protobuf::Arena::CreateMaybeMessage<LPD::MyObj>();
And
google::protobuf::Arena::CreateMessage<LPD::MyObj>();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很晚了,但是您的问题的答案是在文档中,在这里。消息的静态“ new()”功能使用空竞技场调用CreateMayBemessage函数。
This is pretty late, but the answer to your question is in the documentation, here. The Message's static "New()" function calls the CreateMaybeMessage function with a null Arena.