I don't see this explicitly called out in https://capnproto.org/cxx.html but 
I just wanted to double-check that something like this:


capnp::MallocMessageBuilder builder;
auto msg = builder.initRoot<MyMessage>();
auto nested = msg.initSomeStruct();

for (int i = 0; i < 100000; i++) {
    nested.setField(i);
    write over the wire(nested);
}

Doesn't cause arena allocation & the serialized wire size is going to be 
constant for all messages (i.e. it's going to continue clobbering the 
existing space for that field). It sounded like the only situation
was around re-initializing an existing struct or copying messages in. Just 
wanted to make sure that my understanding is correct & setting non-pointer 
fields is fine. I imagine that probably lists of
primitives are immune to this.

Thanks,
Vitali

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/7b2db4bb-f017-43ec-933f-939f11246e2d%40googlegroups.com.

Reply via email to