- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
std::list<COptions *> COptions::m_InstanceList;
..........
COptions::COptions()
{
for (int i = 0; i < OPTIONS_NUM; ++i)
m_OptionsCache[i].bCached = FALSE;
m_pOptionsHelperWindow = new COptionsHelperWindow(this);
simple_lock lock(m_mutex);
#ifdef _DEBUG
for (std::list<COptions *>::iterator iter=m_InstanceList.begin(); iter != m_InstanceList.end(); ++iter)
ASSERT(*iter != this);
#endif _DEBUG
m_InstanceList.push_back(this);
m_SpeedLimits[0] = m_sSpeedLimits[0];
m_SpeedLimits[1] = m_sSpeedLimits[1];
}
COptions::~COptions()
{
{
simple_lock lock(m_mutex);
std::list<COptions *>::iterator iter;
for (iter=m_InstanceList.begin(); iter != m_InstanceList.end(); ++iter) {
if (*iter == this)
break;
}
ASSERT(iter != m_InstanceList.end());
if (iter != m_InstanceList.end())
m_InstanceList.erase(iter);
}
if (m_pOptionsHelperWindow)
delete m_pOptionsHelperWindow;
m_pOptionsHelperWindow=0;
}
.......
В отладке включается тяжелый героиновый бред разработчиков FileZilla