Can I reuse 'sub' builder instances generated from a flatbuffers::FlatBufferBuilder
after calling builder.Clear()
? What is the effect of builder.Clear()
on sub-builders?
Having generated a flatbuffers schema such as the following:
table FB_mytable1{
myshort::ushort = 0;
}
table FB_table2{
nestedTable1::FB_mytable1;
nestedTable1::FB_mytable1;
}
root_type FB_table2;
If I reset the builder using builder.clear()
, my instantiation of 'flatbuffers::FlatBufferBuilder', will this allow me to generate new serial data without calling a reset function or renewing any of the individual table serialisers, such as my instantiation of FB_mytable1Builder myFB_mytable1Builder(builder)
? Or do I need to ensure that the individual builder objects have a scope that means they are not reused?