mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 20:15:34 +00:00
Previously UnPack would allocate data with new and assign it to a raw pointer. This behavior makes it possible for the pointer to be leaked in case of OOM. This commit defaults to use the user specified pointer (which needs to implement a move constructor, a .get() and a .release() operators), thus preventing these leaks.