Logo Search packages:      
Sourcecode: sbnc version File versions  Download package

CCore::~CCore ( void   )  [virtual]

~CCore

Destructs a CCore object.

Definition at line 202 of file Core.cpp.

References CVector< Type >::Clear(), CConfig::Destroy(), CVector< Type >::GetLength(), m_Config, m_ConfigModule, m_HostAllows, m_Ident, m_Log, m_Modules, m_OtherSockets, m_Users, m_Zones, and UninitializeAdditionalListeners().

                  {
      int a;
      unsigned int i;

      for (a = m_Modules.GetLength() - 1; a >= 0; a--) {
            delete m_Modules[a];
      }

      m_Modules.Clear();

      UninitializeAdditionalListeners();

      for (CListCursor<socket_t> SocketCursor(&m_OtherSockets); SocketCursor.IsValid(); SocketCursor.Proceed()) {
            if (SocketCursor->PollFd->fd != INVALID_SOCKET) {
                  SocketCursor->Events->Destroy();
            }
      }

      i = 0;
      while (hash_t<CUser *> *User = m_Users.Iterate(i++)) {
            delete User->Value;
      }

      if (m_OriginalConfig != m_Config) {
            m_Config->Destroy();
      }

      delete m_ConfigModule;

      CTimer::DestroyAllTimers();

      delete m_Log;
      delete m_Ident;

      g_Bouncer = NULL;

      for (i = 0; i < m_Zones.GetLength(); i++) {
            m_Zones[i]->PerformLeakCheck();
      }

      for (i = 0; i < m_HostAllows.GetLength(); i++) {
            free(m_HostAllows[i]);
      }
}


Generated by  Doxygen 1.6.0   Back to index