mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #4601 from pan-/fix_memory_pool_destructor
rtos: Fix MemoryPool and Queue destructorpull/4636/head
commit
2ffd264bba
|
@ -58,6 +58,11 @@ public:
|
||||||
MBED_ASSERT(_id);
|
MBED_ASSERT(_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Destroy a memory pool */
|
||||||
|
~MemoryPool() {
|
||||||
|
osMemoryPoolDelete(_id);
|
||||||
|
}
|
||||||
|
|
||||||
/** Allocate a memory block of type T from a memory pool.
|
/** Allocate a memory block of type T from a memory pool.
|
||||||
@return address of the allocated memory block or NULL in case of no memory available.
|
@return address of the allocated memory block or NULL in case of no memory available.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -60,6 +60,10 @@ public:
|
||||||
MBED_ASSERT(_id);
|
MBED_ASSERT(_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~Queue() {
|
||||||
|
osMessageQueueDelete(_id);
|
||||||
|
}
|
||||||
|
|
||||||
/** Put a message in a Queue.
|
/** Put a message in a Queue.
|
||||||
@param data message pointer.
|
@param data message pointer.
|
||||||
@param millisec timeout value or 0 in case of no time-out. (default: 0)
|
@param millisec timeout value or 0 in case of no time-out. (default: 0)
|
||||||
|
|
Loading…
Reference in New Issue