We patch flatbuffers to add a Table::ClearField method. This method modifies an existing vtable. I think this vtable may be shared with other tables (in the same buffer), which means it will clear the same field for them too.
I think this is the reason upstream doesn't have a GetMutableVTable, because there aren't really any modifications to a vtable which are safe at this point in its lifecycle.
Presumably there's some way to find/create a vtable with the field unset and swap to that, but I have not yet dug in enough to find it.
We patch flatbuffers to add a
Table::ClearFieldmethod. This method modifies an existing vtable. I think this vtable may be shared with other tables (in the same buffer), which means it will clear the same field for them too.I think this is the reason upstream doesn't have a
GetMutableVTable, because there aren't really any modifications to a vtable which are safe at this point in its lifecycle.Presumably there's some way to find/create a vtable with the field unset and swap to that, but I have not yet dug in enough to find it.