| 75 | |
| 76 | |
| 77 | CStatus GParamManager::removeByKey(const std::string& key) { |
| 78 | CGRAPH_FUNCTION_BEGIN |
| 79 | CGRAPH_LOCK_GUARD lock(this->mutex_); // 创建和销毁的时候,加锁 |
| 80 | auto param = params_map_.find(key); |
| 81 | if (param == params_map_.end()) { |
| 82 | CGRAPH_RETURN_ERROR_STATUS("param [" + key + "] no find") |
| 83 | } |
| 84 | |
| 85 | CGRAPH_DELETE_PTR(param->second) |
| 86 | params_map_.erase(param); |
| 87 | CGRAPH_FUNCTION_END |
| 88 | } |
| 89 | |
| 90 | |
| 91 | std::vector<std::string> GParamManager::getKeys() { |