From ddfcf65b726257fab0541c7be3c847c42fa14f82 Mon Sep 17 00:00:00 2001 From: ChunelFeng Date: Sun, 27 Aug 2023 22:54:54 +0800 Subject: [PATCH] [bugfix] remove ring_buffer_queue_[head_].release(); in RingBuffer to avoid memory leak --- src/UtilsCtrl/ThreadPool/Queue/UAtomicRingBufferQueue.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/UtilsCtrl/ThreadPool/Queue/UAtomicRingBufferQueue.h b/src/UtilsCtrl/ThreadPool/Queue/UAtomicRingBufferQueue.h index 85eea94a..441088c6 100644 --- a/src/UtilsCtrl/ThreadPool/Queue/UAtomicRingBufferQueue.h +++ b/src/UtilsCtrl/ThreadPool/Queue/UAtomicRingBufferQueue.h @@ -89,7 +89,6 @@ class UAtomicRingBufferQueue : public UQueueObject { } value = std::move((*ring_buffer_queue_[head_])); - ring_buffer_queue_[head_].release(); head_ = (head_ + 1) % capacity_; } push_cv_.notify_one();