I’m giving a talk next week at GDC called The Beauty of Destruction. Here’s a snippet of code we’ll be looking at during the talk, probably similar to C++ destructors you’ve observed if you’re a C++ coder. This is an imperfect destructor in many ways. How many can you detect?
if( m_pOrdnance != NULL )
m_pOrdnance = NULL;
if( m_hAlert != NULL )
m_hAlert = NULL;
for( int i = 0; i < m_CrewSize; i++ )