Fixed missing virtual destructor in allocator.

Change-Id: I458249d95e6d65ac039e84d947d2fdf4fd1c3809
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen 2014-12-08 17:19:29 -08:00
parent 9566669245
commit 318668aed6
1 changed files with 1 additions and 0 deletions

View File

@ -304,6 +304,7 @@ struct String : public Vector<char> {
// 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; }
};