GetArenaNoVirtual is returning no Arena even after creating the message using Arena

47 views
Skip to first unread message

LakshmiKanth Gupta

unread,
Dec 2, 2022, 3:39:24 AM12/2/22
to Protocol Buffers
message MyRec1
{
  int32 a=1;
}
message MyRec
{
   MyRec1 rec = 1;
}


auto *rec= google::protobuf::Arena::Create<MyRec>(arena);
rec->mutable_rec()->set_a(100);

mtable_rec() is creating memory using new...Arena which I have used for creating MyRec is not used.

Please help.
Reply all
Reply to author
Forward
0 new messages