corrected template cleanup (previous commit)
This commit is contained in:
@@ -460,6 +460,7 @@ void shutdown()
|
|||||||
for (map<string, DataFieldTemplates*>::iterator it = templatesByPath.begin(); it != templatesByPath.end(); it++) {
|
for (map<string, DataFieldTemplates*>::iterator it = templatesByPath.begin(); it != templatesByPath.end(); it++) {
|
||||||
if (it->second!=&globalTemplates)
|
if (it->second!=&globalTemplates)
|
||||||
delete it->second;
|
delete it->second;
|
||||||
|
it->second = NULL;
|
||||||
}
|
}
|
||||||
templatesByPath.clear();
|
templatesByPath.clear();
|
||||||
|
|
||||||
@@ -641,6 +642,7 @@ result_t loadConfigFiles(MessageMap* messages, bool verbose)
|
|||||||
messages->clear();
|
messages->clear();
|
||||||
globalTemplates.clear();
|
globalTemplates.clear();
|
||||||
for (map<string, DataFieldTemplates*>::iterator it = templatesByPath.begin(); it != templatesByPath.end(); it++) {
|
for (map<string, DataFieldTemplates*>::iterator it = templatesByPath.begin(); it != templatesByPath.end(); it++) {
|
||||||
|
if (it->second!=&globalTemplates)
|
||||||
delete it->second;
|
delete it->second;
|
||||||
it->second = NULL;
|
it->second = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user