Many parts of Protobuf will cache empty objects, in the expectation that 
they'll be reused.  For example, if you have a Message object with a 
repeated message field, and there are five entries in that field, when you 
later call .clear on the object, the five entries will be marked as unused 
but the objects will still exist.  That way, when the application needs to 
allocate the field again, it will be able to reuse the old object instead 
of having to allocate more memory.

I also see that the main source of size increase is a RepeatedPtrField, but 
the legend in your chart truncates the element type.  If I were 
troubleshooting this, I'd be looking at that most closely.

-- 
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/groups/opt_out.


Reply via email to