#pragma once class Buffer { public: unsigned char* buffer = nullptr; size_t size = 0; Buffer(size_t size) { this->size = size; this->buffer = new unsigned char[size]; } Buffer() { size = 0; buffer = nullptr; } ~Buffer() { if (buffer) delete[] buffer; } };