I thought the program should loop forever, however the result is just about 10 lines of "destructor in". I was using VS 2005. What's happening?Code:class Test2{
public:
~Test2(){
cout<<"destructor in"<<endl;
delete this;
cout<<"destructor out"<<endl;
}
};
Test2 ts;