Skip to content

Commit

Permalink
Fix HostTests memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Apr 14, 2024
1 parent ce9b2ec commit 9f55db9
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/HostTests/modules/Timers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ class CallbackTimerTest : public TestGroup
statusTimer.stop();
Serial.print("statusTimer stopped: ");
Serial.println(statusTimer);

// Release any allocated delegate memory
timer64.setCallback(TimerDelegate(nullptr));
done = true;
}

Expand Down Expand Up @@ -113,17 +110,6 @@ class CallbackTimerTest : public TestGroup

Serial.println(statusTimer);

{
auto tmp = new Timer;
tmp->initializeMs<1200>(
[](void* arg) {
auto self = static_cast<CallbackTimerTest*>(arg);
Serial << self->timer64 << _F(" fired") << endl;
},
this);
tmp->startOnce();
}

if(1) {
longTimer.setCallback([this]() {
--activeTimerCount;
Expand Down Expand Up @@ -222,7 +208,6 @@ class CallbackTimerTest : public TestGroup
private:
Timer statusTimer;
unsigned statusTimerCount = 0;
Timer timer64;
HardwareTimerTest timer1;
Timer longTimer;
uint32_t longStartTicks = 0;
Expand Down

0 comments on commit 9f55db9

Please sign in to comment.