Skip to content

Commit

Permalink
free in mempool
Browse files Browse the repository at this point in the history
  • Loading branch information
bertmelis committed May 15, 2024
1 parent f88ae5a commit 4516e99
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Packets/Packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ MemoryPool::Variable<EMC_NUM_POOL_ELEMENTS, EMC_SIZE_POOL_ELEMENTS> Packet::_mem
#endif

Packet::~Packet() {
#if EMC_USE_MEMPOOL
_memPool.free(_data);
#else
free(_data);
#endif
}

size_t Packet::available(size_t index) {
Expand Down

0 comments on commit 4516e99

Please sign in to comment.