On Fri, Oct 24, 2008 at 8:34 AM, <[EMAIL PROTECTED]> wrote:
> I have a similar problem... we try to do our own memory management
> for events that we publish/subscribe with some fixed sized pools. I
> don't
> suppose there is a way to pass a block of memory to a message upon
> construction so it
On Oct 23, 1:43 pm, "Kenton Varda" <[EMAIL PROTECTED]> wrote:
> STL strings never shrink. When they're cleared, they keep their memory
> around for reuse. So, you could take advantage of that to accomplish what
> you want by setting all your string fields to values of the maximum size and
> th
STL strings never shrink. When they're cleared, they keep their memory
around for reuse. So, you could take advantage of that to accomplish what
you want by setting all your string fields to values of the maximum size and
then clearing them. For example:
StaticSizeMsg msg;
msg.set_message(st