delete or free on object causes Arduino to hand or reboot I've read a lot about dynamic allocation for strings or buffers, but that's not my case.

I plan to implement much blinkers types as classes, all inheriting from a base Action class.

I declare an array of 10 pointers because I want to limit to 10 blinkers simultaneously at most :

Action** actions = new Action*[10];


In the code, I will do something like :

int i = GetFreeActionID();
actions[i] = new ActionLightBlinkerMono(myPin, onDuration, offDuration);


Then the loop will call a method of the object and it works fine.

When it comes to stop the blinking, I would just destroy the object and set the pointer to zero, so the loop will not try to call the method of the object anymore :

if (actions[i]-&gt;Do() != 0)
{
  delete(actions[i]);
  actions[i] == 0;
}


Howerver, I see in the serial console that when it comes to the delete instruction, the Arduino just reboots itself ...

Tryed also free instead of delete with same result.

How could I safely free the object when it's not used anymore ?

It's an evidence I don't know what will be used at compile time, the blinkers will be started by the user (via I2C instructions) at runtime, hence instanciating different classes.
actions[i] == 0;



That statement has no useful effect. Perhaps you mean:

actions[i] = 0;