delete essentially performs 2 operations:
1. explicit call of the object destructor and
2. freeing up the memory occupied by the object
So calling in the destructor delete this
will lead to an infinite loop, which, in turn, will lead to a stack overflow and the program will crash.
Ввійдіть щоб вподобати
Ввійдіть щоб прокоментувати