From 318668aed6948709b684e3da56dacdcd063a765f Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Mon, 8 Dec 2014 17:19:29 -0800 Subject: [PATCH] Fixed missing virtual destructor in allocator. Change-Id: I458249d95e6d65ac039e84d947d2fdf4fd1c3809 Tested: on Linux. --- include/flatbuffers/flatbuffers.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index 75db44aa2..8a07899e2 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -304,6 +304,7 @@ struct String : public Vector { // with custom allocation (see the FlatBufferBuilder constructor). class simple_allocator { public: + virtual ~simple_allocator() {} virtual uint8_t *allocate(size_t size) const { return new uint8_t[size]; } virtual void deallocate(uint8_t *p) const { delete[] p; } };