Add Address Sanitizer suppression list.

This replaces the unnecessary deallocations on program termination.
Passing in the suppression list environment variable via setenv()
doesn't seem to work, so I've added a comment in the Makefile to explain
invocation.
This commit is contained in:
2020-09-24 03:12:24 +02:00
parent c33f218e56
commit 006d1000c7
5 changed files with 5 additions and 22 deletions

View File

@@ -189,19 +189,6 @@ void TableData::init() {
}
}
void TableData::cleanup() {
/*
* This is just to shut the address sanitizer up. Dynamically allocated data
* doesn't need to be cleaned up if it's supposed to last the program's full runtime.
*/
for (auto& pair : MissionManager::Rewards)
delete pair.second;
for (auto& pair : MissionManager::Tasks)
delete pair.second;
for (auto& pair : NPCManager::NPCs)
delete pair.second;
}
/*
* Some item categories either don't possess iEquipLoc or use a different value for item type.
*/