This is a variation on the delete this
debate, to do with what happens with intermediate method calls.
Basically, if method A calls method B, and method B destroys the object, does anything particular happen inside method A when returning from B? Something like this:
struct test {
void A() {
B();
// what happens here besides being unable to dereference `this` anymore?
}
void B() {delete this;}
};
Can it be assumed that returning into a method of an expired object will proceed as normal as long as the memory location of the former object isn't interacted with any further?