Delete this is not acceptable or possible since delete this means we are trying to delete the reference of the object and calling the function from the object itself.
Its like Kalidas , trying to cut the same branch on which you are seating.
The most important point is , The way in which the object is created .
If the object is created on stack - the object will be destroyed twice resulting in crash . First time when delete this is called second time when the stack unwinds.
But if the object is created in heap - delete this may work but that should be the last line using the object.
Amit Banerjee Wrote: Delete this is not acceptable or possible since delete this means we are trying to delete the reference of the object and calling the function from the object itself.
Its like Kalidas , trying to cut the same branch on which you are seating.