Fix memory leak in attack library
This commit is contained in:
parent
65f814b006
commit
163752a8ea
|
@ -13,6 +13,9 @@ namespace CreatureLib::Library {
|
|||
AttackLibrary() = default;
|
||||
|
||||
~AttackLibrary(){
|
||||
for (auto attack: _attacks){
|
||||
delete attack.second;
|
||||
}
|
||||
_attacks.clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue