Re: [protobuf] ParseFromArray -- in Java

2010-10-25 Thread Evan Jones
On Oct 25, 2010, at 16:52 , ury wrote: i.e. Does the Java implementation has the Clear() method ? No, the Java implementation has immutable objects, so this is generally not possible. A new object must be created for each item. Immutable objects have benefits like being thread safe (see ht

Re: [protobuf] ParseFromArray -- in Java

2010-10-25 Thread Christopher Smith
Might as well use a new object. Creating a new object is if anything likely less overhead. --Chris On Oct 25, 2010, at 1:52 PM, ury wrote: > Hi! > > Is it possible to reuse the same Protobuf object when unserializing a > large number of objects in Java using the equivalent of the C++ > Parse