Test buffer
This commit is contained in:
@@ -306,13 +306,14 @@ class MemoryBuffer : private Allocator, public Buffer<T> {
|
||||
private:
|
||||
T data_[SIZE];
|
||||
|
||||
void grow(std::size_t size);
|
||||
|
||||
// Free memory allocated by the buffer.
|
||||
void free() {
|
||||
if (this->ptr_ != data_) this->deallocate(this->ptr_, this->capacity_);
|
||||
}
|
||||
|
||||
protected:
|
||||
void grow(std::size_t size);
|
||||
|
||||
public:
|
||||
explicit MemoryBuffer(const Allocator &alloc = Allocator())
|
||||
: Allocator(alloc), Buffer<T>(data_, SIZE) {}
|
||||
|
||||
Reference in New Issue
Block a user