Corrected a bug where buffers were not properly counted when copy constructed

This commit is contained in:
Paul Ferrand 2019-12-10 08:20:55 +01:00
parent 7a70fac564
commit 2cb11c8be7

View file

@ -186,6 +186,7 @@ public:
*/ */
Buffer(const Buffer<Type>& other) Buffer(const Buffer<Type>& other)
{ {
counter().newBuffer(0);
if (resize(other.size())) { if (resize(other.size())) {
std::memcpy(this->data(), other.data(), other.size() * sizeof(value_type)); std::memcpy(this->data(), other.data(), other.size() * sizeof(value_type));
} }