Merge "Fixed missing virtual destructor in allocator." into ub-games-master

This commit is contained in:
Wouter van Oortmerssen 2014-12-09 02:01:20 +00:00 committed by Android (Google) Code Review
commit 10f4ecac26
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). // with custom allocation (see the FlatBufferBuilder constructor).
class simple_allocator { class simple_allocator {
public: public:
virtual ~simple_allocator() {}
virtual uint8_t *allocate(size_t size) const { return new uint8_t[size]; } virtual uint8_t *allocate(size_t size) const { return new uint8_t[size]; }
virtual void deallocate(uint8_t *p) const { delete[] p; } virtual void deallocate(uint8_t *p) const { delete[] p; }
}; };