News for hackers. Stuff that matters.
Re:The Best C++ Interview Question – Ever by machrider on Monday December 07, 2009 @07:05PM (#982592)
The function's body is not part of the object itself. When you delete the object, you can keep executing the function just fine, as long as you don't access any member variables.
Re:The Best C++ Interview Question – Ever by haseman on Monday December 07, 2009 @07:21PM (#982628)
You keep executing the function because it's on the stack. The program counter keeps moving through the method until it hits a return statement. God help you if you try to reference one of the class' internal data objects as their heap space could have been allocated to something else running on another thread.
Re:The Best C++ Interview Question – Ever by DanielBMarkham on Tuesday December 08, 2009 @07:40AM (#983554)
The function's body is not part of the object itself

Most all of the time, yes. But the function could have been dynamically allocated to an instance of the object. You don't know from the definition of the question. A dynamic function, presumably, would be picked up by the dtor.