mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 00:52:17 +00:00
Merge "Fixed missing virtual destructor in allocator." into ub-games-master
This commit is contained in:
committed by
Android (Google) Code Review
commit
10f4ecac26
@@ -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; }
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user