POO- destructeurs / OOP

Bonjour, je commence la POO sur Arduino mais je ne trouve pas comment déclarer le destructeur...

Merci de l'attention !

Hi, I begin the OOP but in dont found how insert a "destructeur"...

Thank for attention !

Do you really need one? Unless your class uses dynamic memory allocation which is a bad idea in micro controllers anyway, you don't need to write a destructor. Show us some code so we can help.

I think, because I want to create a game with LEDs...

I don't know how do that without OOP...

Louloux9100:
I think, because I want to create a game with LEDs...

I don't know how do that without OOP...

Neither do I without a better explanation of the problem.

A game like that : http://images.google.fr/imgres?imgurl=http%3A%2F%2Fi.ytimg.com%2Fvi%2FR9qhIGORPLY%2Fhqdefault.jpg&imgrefurl=http%3A%2F%2Ffantasticpixcool.com%2Fsuper%2Bmini&h=360&w=480&tbnid=e2XM2-uS33GCXM%3A&docid=p-uLpx7uTYV-JM&ei=Ls3vV6mGKse5ap-UoAg&tbm=isch&iact=rc&uact=3&dur=1277&page=3&start=64&ndsp=16&ved=0ahUKEwip1dak7bnPAhXHnBoKHR8KCAEQMwhpKEYwRg&bih=638&biw=1180

A simple class with only a constructor and a destructor

class example {
public:
  byte* buffer;
  byte bSize;
  example(byte pSize) {
    buffer = (byte*)malloc(pSize);
    if (buffer) {
      bSize = pSize;
    }
  }
  ~example() {
    if (buffer) {
      free(buffer);
    }
  }
};

Thank ^^