Fix memory leak in attack library

This commit is contained in:
Deukhoofd 2019-10-31 13:30:22 +01:00
parent 65f814b006
commit 163752a8ea
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,9 @@ namespace CreatureLib::Library {
AttackLibrary() = default;
~AttackLibrary(){
for (auto attack: _attacks){
delete attack.second;
}
_attacks.clear();
}