mirror of
https://github.com/google/flatbuffers.git
synced 2026-08-03 23:21:06 +00:00
54f8b787cb
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.