diff options
Diffstat (limited to '')
-rw-r--r-- | device/pools.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/device/pools.go b/device/pools.go index e778d2e..6939eeb 100644 --- a/device/pools.go +++ b/device/pools.go @@ -65,6 +65,7 @@ func (device *Device) GetInboundElement() *QueueInboundElement { } func (device *Device) PutInboundElement(msg *QueueInboundElement) { + msg.clearPointers() if PreallocatedBuffersPerPool == 0 { device.pool.inboundElementPool.Put(msg) } else { @@ -81,6 +82,7 @@ func (device *Device) GetOutboundElement() *QueueOutboundElement { } func (device *Device) PutOutboundElement(msg *QueueOutboundElement) { + msg.clearPointers() if PreallocatedBuffersPerPool == 0 { device.pool.outboundElementPool.Put(msg) } else { |