Skip to content

Commit

Permalink
fix: 🩹 Fix memory leak in RecursiveMutex class
Browse files Browse the repository at this point in the history
  • Loading branch information
ion098 committed Aug 19, 2024
1 parent 402a090 commit fbf8e84
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/gamepad/recursive_mutex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class RecursiveMutex {
bool give() { return pros::c::mutex_recursive_give(mutex); }

void unlock() { this->give(); }

~RecursiveMutex() { pros::c::mutex_delete(mutex); }
private:
pros::mutex_t mutex;
};
Expand Down

0 comments on commit fbf8e84

Please sign in to comment.