Details
-
Task
-
Resolution: Fixed
-
Minor
-
.master
Description
The Configuration class still makes use of manual memory management - for example in Configuration::parseConfiguration():
bool Configuration::parseConfiguration(const char *str, |
SERVER_HANDLE_V1* sapi) {
|
std::vector<ConfigItem *> config;
|
|
std::map<std::string, value_t>::const_iterator iter;
|
for (iter = attributes.begin(); iter != attributes.end(); ++iter) { |
config.push_back(new ConfigItem(iter->first.c_str(), |
iter->second.datatype));
|
}
|
|
// we don't have a good support for alias yet... |
config.push_back(new ConfigItem("cache_size", DT_SIZE)); |
...
|
This should be replaced with smart (owning) pointers - unique_ptr in this case.
Attachments
For Gerrit Dashboard: MB-22653 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
73845,3 | MB-22653: Remove manual memory management in the Configuration class | master | ep-engine | Status: MERGED | +2 | +1 |