SubX crashed on both Linux and Windows in a set::erase call (STL) when releasing C++ objects. Swapping two loops solved it. (the second loop was referencing variables released in the first loop). This makes SubX terminate nicely, but doesn't solve all crashes for skins2. (more cleanup to do)
VarManager::~VarManager()
{
+ // Delete the anonymous variables
+ while( !m_anonVarList.empty() )
+ {
+ m_anonVarList.pop_back();
+ }
+
// Delete the variables in the reverse order they were added
list<string>::const_iterator it1;
for( it1 = m_varList.begin(); it1 != m_varList.end(); it1++ )
m_varMap.erase(*it1);
}
- // Delete the anonymous variables
- while( !m_anonVarList.empty() )
- {
- m_anonVarList.pop_back();
- }
-
delete m_pTooltipText;
// Warning! the help text must be the last variable to be deleted,