fixing resources releasing

This commit is contained in:
Evgeny
2018-01-22 17:02:46 -06:00
والد c00a0feb36
کامیت 9a9418ad16
14فایلهای تغییر یافته به همراه145 افزوده شده و 323 حذف شده
+5 -3
مشاهده پرونده
@@ -100,9 +100,11 @@ class MetricsDict {
}
static void Destroy() {
for (auto& entry : *map_) delete entry.second;
delete map_;
map_ = NULL;
if (map_ != NULL) {
for (auto& entry : *map_) delete entry.second;
delete map_;
map_ = NULL;
}
}
const Metric* Get(const std::string& name) const {
+1
مشاهده پرونده
@@ -101,6 +101,7 @@ CONSTRUCTOR_API void constructor() {
}
DESTRUCTOR_API void destructor() {
rocprofiler::MetricsDict::Destroy();
util::HsaRsrcFactory::Destroy();
util::Logger::Destroy();
}