class object
{
public:
void check()
{
std::cout<<\"I am doing ok...\"<
Even if the method call was using the this pointer it would not be guaranteed to crash. The pointer p when deleted is not being zeroed so is still pointing to the same address in memory. Depending on the implementation of new/delete and the heap manager this memory might not even be resused so the use of p may still continue to work even though the memory has been released.