-9
class LTexture
{
    public:

        LTexture();

        ~LTexture(); // what does it do exactly?
};
user0042
  • 7,917
  • 3
  • 24
  • 39
Kaung
  • 13
  • 2
  • 9
    Please have a look at this [C++ books](https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list) list. – Ron Nov 18 '17 at 17:50
  • 7
    This is the destructor. Lookup your textbook what's it's purpose. – user0042 Nov 18 '17 at 17:50

1 Answers1

1

~constructorName() is the class's destructor, which gets called when the object goes out of scope or delete is called. The destructor is used for cleanup code, such as freeing memory and closing files.

diralik
  • 6,391
  • 3
  • 28
  • 52
Alex Boxall
  • 541
  • 5
  • 13