Implement native_shared attribute for C++.

Fixes #5141. See also #5145.
This commit is contained in:
iceboy
2019-02-05 12:59:44 -08:00
parent 76a024137f
commit c5df650099
4 changed files with 30 additions and 5 deletions

View File

@@ -88,6 +88,12 @@ convenient accessors for all fields, e.g. `hp()`, `mana()`, etc:
*Note: That we never stored a `mana` value, so it will return the default.*
The following attributes are supported:
- `native_shared` (on a field): For string fields, this enables the usage of
CreateSharedString() instead of CreateString() for generated
CreateXxxDirect(), and Pack() in object-based API if enabled.
## Object based API. {#flatbuffers_cpp_object_based_api}
FlatBuffers is all about memory efficiency, which is why its base API is written