Meaning of "~" (tilde) symbol in C++?
It is the destructor.
It gets called when you destroy (reaching end of scope, or calling delete
to a pointer to) the instance of the object.
In the context you're using it, it defines a destructor.
In other context such as the following one, it's also called bitwise negation (complement):
int a = ~100;
int b = ~a;
Output: (ideone)
-101
100