Re: [protobuf] memory usage problem of using a group record

2010-11-18 Thread Jason Hsueh
Well, that depends on how you set up your map. You could instead make the key a pointer to the protobuf field, and define your comparator so that it dereferences the pointer. Of course you need to make sure that the pointer is actually valid: if you mutate the field you may invalidate the pointer.

[protobuf] memory usage problem of using a group record

2010-11-16 Thread Ma Jin
I try to use the pb to store a group of record with the same schema. I wonder to know whether the key of the properties would be copied for every record like map. if like this, it seems to a waste of memory. -- You received this message because you are subscribed to the Google Groups "Protocol