Skip to content

Commit dd4096d

Browse files
pan-adbridge
authored andcommitted
rtos: Add missing destructor for MemoryPool objects.
1 parent 0440023 commit dd4096d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rtos/MemoryPool.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ class MemoryPool : private mbed::NonCopyable<MemoryPool<T, pool_sz> > {
5858
MBED_ASSERT(_id);
5959
}
6060

61+
/** Destroy a memory pool */
62+
~MemoryPool() {
63+
osMemoryPoolDelete(_id);
64+
}
65+
6166
/** Allocate a memory block of type T from a memory pool.
6267
@return address of the allocated memory block or NULL in case of no memory available.
6368
*/

0 commit comments

Comments
 (0)