Код: Выделить всё
// grpc service method implementation
::grpc::Status AbcService::GetDetail(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::abc::Detail* response)
{
response = _detail->toGrpc(response->GetArena());
}
// arena usage
namespace abc {
abc::Detail* Detail::toGrpc(google::protobuf::Arena* arena) const
{
return google::protobuf::Arena::CreateMessage(arena);
}
}
Если это приведет к утечке памяти, какие изменения должны быть внесены, чтобы разрешить Google :: protobuf :: arena быть единственным аргументом метода togrpc ?
Подробнее здесь: https://stackoverflow.com/questions/794 ... emory-leak