From 163752a8ea91265a09cbf1b0e6a547822beaf088 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Thu, 31 Oct 2019 13:30:22 +0100 Subject: [PATCH] Fix memory leak in attack library --- src/Library/AttackLibrary.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Library/AttackLibrary.hpp b/src/Library/AttackLibrary.hpp index 2c59a2b..2b4177f 100644 --- a/src/Library/AttackLibrary.hpp +++ b/src/Library/AttackLibrary.hpp @@ -13,6 +13,9 @@ namespace CreatureLib::Library { AttackLibrary() = default; ~AttackLibrary(){ + for (auto attack: _attacks){ + delete attack.second; + } _attacks.clear(); }