1651Fermer1653
SasumeLe 29/05/2010 à 13:45
void cleanup(char *msg) {
  SDL_FreeSurface(m_Background);
  while (m_IconList.size() != 0)
  {
    delete m_IconList.back();
    m_IconList.pop_back();
  }
  throw msg;
}

...

catch (char* errorStr)
{
  cleanup(errorStr);
}
catch (std::bad_alloc)
{
  cleanup("Out of memory\n");
}
?