Forgot to count the buffer deletion in move operator=

This commit is contained in:
Jean Pierre Cimalando 2020-04-19 18:31:27 +02:00
parent 43a7df2de3
commit f7e80452c4

View file

@ -250,6 +250,8 @@ public:
Buffer<Type>& operator=(Buffer<Type>&& other) noexcept Buffer<Type>& operator=(Buffer<Type>&& other) noexcept
{ {
if (this != &other) { if (this != &other) {
if (largerSize > 0)
_counter.bufferDeleted(largerSize * sizeof(value_type));
largerSize = other.largerSize; largerSize = other.largerSize;
alignedSize = other.alignedSize; alignedSize = other.alignedSize;
normalData = other.normalData; normalData = other.normalData;