Possible Duplicate:
Undefined, unspecified and implementation-defined behavior
I know calling delete on same object is disastrous. But that is true as long as the memory is not reallocated for some other object before the second call to delete. But, even doing the below is wrong? If I remove the cout, the code is not dumping core.
int main()
{
A *a1 = new A();
delete a1;
cout<<a1<<endl;
delete a1;
}