* Clear unconsumed message objects in the message queue * @param free_obj {bool} Release message objects by calling delete method */
| 58 | * @param free_obj {bool} Release message objects by calling delete method |
| 59 | */ |
| 60 | void clear(bool free_obj = false) { |
| 61 | if (free_obj) { |
| 62 | for (typename std::list<T*>::iterator it = |
| 63 | tbox_.begin(); it != tbox_.end(); ++it) { |
| 64 | |
| 65 | delete *it; |
| 66 | } |
| 67 | } |
| 68 | tbox_.clear(); |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * Send message object |
no test coverage detected