Listing 3: Confidence Check scenario code

int main(int argc, char* argv[])
{
  bool bError = false;
  AppWatchMan  myAppWatchMan;
  bError = myAppWatchMan.DoRounds("Before Test, ",
                                   AWM::BEGIN_CONF_CHECK);
  IntroduceLeak();
 
  bError = myAppWatchMan.DoRounds("After Test, ",
                                   AWM::END_CONF_CHECK);
  return bError;
}

void IntroduceLeak(void)
{
  char* pBuffer = new char [sizeof("Hello World")];
  strcpy(pBuffer, "Hello World");
//  delete [] pBuffer;  // intentional
}
— End of Listing —