Previously, OptionRowHandler was owned and freed by
ScreenOptionsMaster (and ScreenOptionsManageProfiles). Make it owned by OptionRow; the only pointer to them is where they're stored in the OptionRow. This eliminates the remaining association between m_OptionRowHandlers and m_pRows; that was confusing, because they're in different places, and aren't always the same size. It also simplifies using OptionRowHandlers.
This commit is contained in:
@@ -205,7 +205,6 @@ void ScreenOptions::InitMenu( const vector<OptionRowDefinition> &vDefs, const ve
|
||||
for( unsigned i=0; i<m_pRows.size(); i++ )
|
||||
{
|
||||
m_framePage.RemoveChild( m_pRows[i] );
|
||||
m_pRows[i]->DetachHandler();
|
||||
SAFE_DELETE( m_pRows[i] );
|
||||
}
|
||||
m_pRows.clear();
|
||||
|
||||
Reference in New Issue
Block a user