May 15, 2016 at 8:13pm
It's not a constructor.
It's the destructor. It's the function that gets called when the object is destroyed, either by going out of scope or by having delete called on it.
It's for doing anything that needs doing when the object lifetime ends. For example, releasing resources.
You should never call it.
Last edited on May 15, 2016 at 8:14pm
May 15, 2016 at 8:41pm
Thank you for the answers!:)