use shared_ptr to auto-free task
| 92 | |
| 93 | // use shared_ptr to auto-free task |
| 94 | virtual std::shared_ptr<T> retrieve_task(uint64_t id) { |
| 95 | auto it = tasks_.find(id); |
| 96 | if (it == tasks_.end()) { |
| 97 | return nullptr; |
| 98 | } |
| 99 | auto tmp = std::move(it->second); |
| 100 | tasks_.erase(it); |
| 101 | return tmp; |
| 102 | } |
| 103 | |
| 104 | protected: |
| 105 | inline dfsan_label_info* get_label_info(dfsan_label label) { |
no test coverage detected