When is it safe to call this-> in constructor and destructor
Within any non-static member function, this points to the object that the function was called on. It’s safe to use as long as that’s a valid object. Within the body of a constructor or destructor, there is a valid object of the class currently being constructed. However, if this is the base sub-object of some … Read more