diff --git a/YSFGateway/Reflectors.cpp b/YSFGateway/Reflectors.cpp index 535e1d9..7ec3771 100644 --- a/YSFGateway/Reflectors.cpp +++ b/YSFGateway/Reflectors.cpp @@ -40,6 +40,8 @@ CReflectors::~CReflectors() { for (std::vector::iterator it = m_reflectors.begin(); it != m_reflectors.end(); ++it) delete *it; + + m_reflectors.clear(); } static bool refComparison(const CYSFReflector* r1, const CYSFReflector* r2) @@ -71,6 +73,8 @@ bool CReflectors::load() for (std::vector::iterator it = m_reflectors.begin(); it != m_reflectors.end(); ++it) delete *it; + m_reflectors.clear(); + char buffer[100U]; while (::fgets(buffer, 100U, fp) != NULL) { if (buffer[0U] == '#')