Hello, opened up an issue in the Protocol Buffers github site:
https://github.com/google/protobuf/issues/1009 With best regards, Torsten Am Mittwoch, 25. November 2015 19:39:38 UTC+1 schrieb [email protected]: > > Hello, > > i'am using a copy of the master branch of protobuf v 3.0.0-beta-1. > > { > DynamicMessageFactory dynamicMessageFactory; > Arena myArena; > > const Descriptor *messageDesc = > m_pProtoFileDescriptor->FindMessageTypeByName( "Foo" ); > Message *fooMessage = dynamicMessageFactory.GetPrototype( messageDesc > )->New(&myArena); > } > > What i try to do is loading a .proto file at runtime and create various > Message instances from it by name. I want to use a Arena cause of the > massive amount of message creations out of this loaded .proto Descriptor. > > Unfortunately both the DynamicMessageFactory and the Arena try to destroy > the created message. The Message::New method description says that the > ownership of the created message will be passed to the caller or in this > case the arena. > > Is there another way to create Message instances out of a Descriptor at > runtime? > Is it intended to use the DynamicMessageFactory in common with a Arena? > > With best regards, > > Torsten > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
