Dont delete events after triggering the event listener. Once they're in the event listeners hands, it's their responsibility to properly clean up the memory.

This commit is contained in:
Deukhoofd committed 2020-07-31 15:47:18 +02:00
1 parent df0eca1716
commit 3e8f9340f3
1 file changed
-1
-1
View File
@@ -20,7 +20,6 @@ namespace CreatureLib::Battling {
for (auto listener : _listeners) {
listener(eventData);
}
delete eventData;
}
};
}