The side effects of that are that the object is no longer valid, nor are pointers or references to that object.
I've seen this pattern a lot of places. Typically it's used in a reference counting sort of situation, when the last reference to the object goes away the object deletes itself. It's also typically paired with a factory function of some sort, e.g. a static class member function named Create, taking no parameters, and returning a pointer to the class. The body of this function does the corresponding new
, and your constructor can even be private (that way people don't create the object in a way that will mess up your cleanup code).