fixing resources releasing
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -101,6 +101,7 @@ CONSTRUCTOR_API void constructor() {
|
||||
}
|
||||
|
||||
DESTRUCTOR_API void destructor() {
|
||||
rocprofiler::MetricsDict::Destroy();
|
||||
util::HsaRsrcFactory::Destroy();
|
||||
util::Logger::Destroy();
|
||||
}
|
||||
|
||||
مرجع در شماره جدید
Block a user