class LTexture
{
public:
LTexture();
~LTexture(); // what does it do exactly?
};
Asked
Active
Viewed 90 times
-9
-
9Please 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
-
7This is the destructor. Lookup your textbook what's it's purpose. – user0042 Nov 18 '17 at 17:50
1 Answers
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