From 4516e995de1a05da932f21bde608ea2c2d42a858 Mon Sep 17 00:00:00 2001 From: Bert Melis Date: Wed, 15 May 2024 15:54:11 +0200 Subject: [PATCH] free in mempool --- src/Packets/Packet.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Packets/Packet.cpp b/src/Packets/Packet.cpp index a23786f..14d241b 100644 --- a/src/Packets/Packet.cpp +++ b/src/Packets/Packet.cpp @@ -15,7 +15,11 @@ MemoryPool::Variable Packet::_mem #endif Packet::~Packet() { + #if EMC_USE_MEMPOOL + _memPool.free(_data); + #else free(_data); + #endif } size_t Packet::available(size_t index) {