Skip to content

Commit b49fbf1

Browse files
committed
rtos: Add missing destructor for MemoryPool objects.
1 parent d121a43 commit b49fbf1

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
@@ -57,6 +57,11 @@ class MemoryPool {
5757
MBED_ASSERT(_id);
5858
}
5959

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

0 commit comments

Comments
 (0)