Resolve memory issue with Event Hooks.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-12-15 12:27:56 +01:00
parent 410487c86b
commit db002c784f
3 changed files with 5 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ namespace CreatureLib::Battling {
class EventData {
public:
virtual ~EventData() = default;
virtual EventDataKind GetKind() = 0;
};

View File

@@ -19,6 +19,7 @@ namespace CreatureLib::Battling {
for (auto listener : _listeners) {
listener(eventData);
}
delete eventData;
}
};
}