flatbuffers/samples
Wouter van Oortmerssen c66683f27f Add ::Set function to Unions to make memory ownership clear.
Unions own the NativeTable* value member because they need to destroy them
when the Union goes out of scope.  Currently, the data is destroyed by calling
delete, which means that the member needs to be allocated with new.  However,
making the allocation the responsibility of the client and the destruction
the responsibility of the Union can lead to potential errors.  Adding a
Set function will ensure that the memory is allocated correctly so that it
can be deleted later.

From cl/142161569.

Change-Id: I4605f26d2749164819bfae0140e5fae08442b50a
2016-12-19 15:21:08 -08:00
..
android Merge "Removed reference to deprecated NDK toolchain version." into ub-games-master 2016-05-23 23:49:56 +00:00
SampleBinary.cs Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00
SampleBinary.java Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00
SampleBinary.php Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00
android_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
csharp_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
go_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
java_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
javascript_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
monster.fbs Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00
monster_generated.h Add ::Set function to Unions to make memory ownership clear. 2016-12-19 15:21:08 -08:00
monsterdata.json add weapon + equipment to json example (#4114) 2016-12-12 14:12:56 -08:00
php_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
python_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
sample_binary.cpp Silenced unused variable warnings. 2016-01-19 15:30:41 -08:00
sample_binary.go Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00
sample_binary.py Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00
sample_text.cpp Allow GenerateText() to indicate failure to encode flatbuffer to JSON (i.e., non-UTF-8 string data) 2016-08-18 10:23:26 -07:00
samplebinary.js Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00