@@ -19,6 +19,8 @@ STATEMACHINE::StateMachine(State *state)
STATEMACHINE::~StateMachine()
{
+ while (!stack.empty())
+ pop();
}
void STATEMACHINE::push(State *state)
@@ -22,7 +22,7 @@ MAP::Map(int width, int height, uint16_t *layer0, uint16_t *layer1) : anim()
MAP::~Map()
- // TODO if you allocate dynamically members
+ delete this->renderer;
void MAP::update(unsigned dt)