mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-01-20 11:31:46 +01:00
Update to MemoryUsage worker
This commit is contained in:
@@ -234,9 +234,12 @@ func (l *Level) forceFree() (int, error) {
|
||||
// If delme is true, it means 'b' itself (the head) was the oldest
|
||||
// and needs to be removed from the slice.
|
||||
if delme {
|
||||
if cap(b.data) == BufferCap {
|
||||
bufferPool.Put(b)
|
||||
}
|
||||
// Nil out fields to ensure no hanging references
|
||||
|
||||
b.next = nil
|
||||
b.prev = nil
|
||||
b.data = nil
|
||||
|
||||
l.metrics[i] = nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user