mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-12 16:00:59 +00:00
Implement (shared) attribute for C++ (#5157)
* Implement native_shared attribute for C++.
Fixes #5141. See also #5145.
* Refine comment in idl.h
* Also refine docs
* Revert "Also refine docs"
This reverts commit 09dab7b45c.
* Also refine docs again.
* grumble
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
cf47f27164
commit
60e94cf083
@@ -88,6 +88,14 @@ 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:
|
||||
|
||||
- `shared` (on a field): For string fields, this enables the usage of string
|
||||
pooling (i.e. `CreateSharedString`) as default serialization behavior.
|
||||
|
||||
Specifically, `CreateXxxDirect` functions and `Pack` functions for object
|
||||
based API (see below) will use `CreateSharedString` to create strings.
|
||||
|
||||
## Object based API. {#flatbuffers_cpp_object_based_api}
|
||||
|
||||
FlatBuffers is all about memory efficiency, which is why its base API is written
|
||||
|
||||
Reference in New Issue
Block a user