Code:
#include <iostream>
using namespace std;

class Test
{
public:
	void immortal() { cout << "I am Immortal!" << endl; }
};

int main()
{
	Test* t = new Test;
	t->immortal();
	delete t;
	t->immortal();
	return 0;
}
The above code works fine (in debug and non debug mode).
I have a similar situation in my project. Where an object gets deleted, and then a successful call to it's method is
made. But when that method tried to access some data member (in this case an integer)
my program crashed!

How to detect where the object gets deleted? There is no obvious hint form. Also function calls working fine confuse me more