SyntaxFix
Write A Post
Hire A Developer
Questions
This is a destructor. It's called when the object is destroyed (out of life scope or deleted).
To be clear, you have to use ~NameOfTheClass like for the constructor, other names are invalid.