When I write out messages using C++ I'm careful to clear messages and
re-use them, is there something equivalent on the java side when
reading those same messages in?

My code looks like:

CodedInputStream stream = CodedInputStream.newInstance(inputStream);

while ( !stream.isAtEnd() )
{
     MyMessage.Builder builder = MyMessage.newBuilder();
     stream.readMessage(builder, null);
     MyMessage myMessage = builder.build();

     for ( MessageValue messageValue : myMessage.getValuesList() )
     {
        ......
     }
}

I'm passing 150 messages each with 1000 items, so presumably memory is
allocated 150 times for each of the messages...

- Alex
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to