Destroy sequence contents in sequence destructor.
Destroy loggables in correct order.
This commit is contained in:
parent
1318ba3c3a
commit
42e0e380bd
|
@ -84,16 +84,19 @@ Loggable::close ( void )
|
|||
|
||||
_fp = NULL;
|
||||
|
||||
for ( int i = _log_id; i--; )
|
||||
for ( int i = 0; i < _log_id - 1; ++i )
|
||||
{
|
||||
Loggable ** l = &_loggables[ i ];
|
||||
|
||||
if ( *l )
|
||||
{
|
||||
delete *l;
|
||||
|
||||
*l = NULL;
|
||||
*l = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
_log_id = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -719,10 +722,13 @@ Loggable::log_create ( void ) const
|
|||
void
|
||||
Loggable::log_destroy ( void ) const
|
||||
{
|
||||
// indent();
|
||||
if ( ! _fp )
|
||||
/* tearing down... don't bother */
|
||||
return;
|
||||
|
||||
log( "%s 0x%X destroy (nothing) << ", class_name(), _id );
|
||||
|
||||
char **sa;
|
||||
char **sa;
|
||||
|
||||
Log_Entry e;
|
||||
|
||||
|
|
|
@ -59,6 +59,19 @@ Sequence::init ( void )
|
|||
Sequence::~Sequence ( )
|
||||
{
|
||||
/* FIXME: what to do with regions? */
|
||||
|
||||
for ( std::list <Sequence_Widget*>::iterator i = _widgets.begin();
|
||||
i != _widgets.end(); ++i )
|
||||
{
|
||||
Sequence_Widget *w = *i;
|
||||
|
||||
*i = NULL;
|
||||
|
||||
delete w;
|
||||
}
|
||||
|
||||
_widgets.clear();
|
||||
|
||||
parent()->redraw();
|
||||
parent()->remove( this );
|
||||
// log_destroy();
|
||||
|
|
Loading…
Reference in New Issue