Saturday, 23 June 2012

What happens if 'delete this' is called in destructor?

delete this recursively calls destructor itself, we get indefinite loop and stack overflow:



Visual Studio catches exception:

Unhandled exception at 0x00880a09 in MiscTests.exe: 0xC00000FD: Stack overflow.

No comments:

Post a Comment