• Lawrence Chan's avatar
    [C++] Improve Allocator handling (#4312) · fb87c0d3
    Lawrence Chan authored
    * Improve Allocator handling
    
    - Templatize Allocator on vector_downward, and make it own the allocator
    instance so it can manage lifetimes.
    - Templatize + rename FlatBufferBuilderT accordingly, and add a typedef
    to FlatBufferBuilder so old code continues to work.
    - Fix some issues with the release deleter
    - More details in github issue #4311
    
    * Fix constexpr for older MSVC
    
    * Reimplement allocator improvements via inheritance
    
    Instead of templates, use an abstract base class and some unique_ptrs to
    implement the new and improved allocator.
    
    * Fix misplaced newline
    
    * Add missing override keyword
    
    * Add macro for func delete to support older compilers
    
    * Explicitly move BufferDeleter (maybe fixes VS 10?)
    
    * Revert previous attempt at VS10 fix
    
    * Try yet another workaround for MS 10
    
    * Use FLATBUFFERS_NOEXCEPT macro
    
    * Add FLATBUFFERS_OVERRIDE macro
    
    * Fix some issues with MSVC 16 hack
    
    * Remove dep on unique_ptr
    
    * Update DEPRECATED macro with a message
    
    * Sigh, no delegating ctors before c++11
    
    * Fix simple_allocator stub
    
    * Relax FlatBufferBuilder ctor
    
    * Add vector_downward reset + assert in clear
    
    * Rename DetachedBuffer to FlatBuffer + remove unnecessary deprecations
    
    * Add flatbuffers::FlatBufferBuilder::Release()
    
    * Address remaining allocator-improvements comments
    fb87c0d3
Name
Last commit
Last update
.github Loading commit data...
CMake Loading commit data...
android Loading commit data...
biicode Loading commit data...
docs Loading commit data...
go Loading commit data...
grpc Loading commit data...
include/flatbuffers Loading commit data...
java/com/google/flatbuffers Loading commit data...
js Loading commit data...
net/FlatBuffers Loading commit data...
php Loading commit data...
python Loading commit data...
reflection Loading commit data...
samples Loading commit data...
src Loading commit data...
tests Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE.txt Loading commit data...
appveyor.yml Loading commit data...
biicode.conf Loading commit data...
composer.json Loading commit data...
package.json Loading commit data...
pom.xml Loading commit data...
readme.md Loading commit data...