diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-01 19:40:24 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-01 19:40:24 +0100 |
commit | bdf6ac149ec260dab767663419731b302679f458 (patch) | |
tree | b22277e55cf4167e7bd4af92c21f174ee76686ae /backend/Player.cpp | |
parent | 221b08e07246e84587b4144eca5564ce9ad3a20a (diff) |
test for memory leaks
Diffstat (limited to 'backend/Player.cpp')
-rw-r--r-- | backend/Player.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/Player.cpp b/backend/Player.cpp index 5e0cca9..2de5632 100644 --- a/backend/Player.cpp +++ b/backend/Player.cpp @@ -6,6 +6,10 @@ #include "util.h" Player::Player(Dungeon & dungeon) : dungeon(dungeon) { } +Player::~Player() { + safe_free(this->weapon); + safe_free(this->armor); +} float Player::get_attack() const { if (this->cheating) return 1.f; |