diff --git a/nonlib/NSM/Client.C b/nonlib/NSM/Client.C index 88ac1df..350e628 100644 --- a/nonlib/NSM/Client.C +++ b/nonlib/NSM/Client.C @@ -150,7 +150,6 @@ namespace NSM lo_server_thread_stop( _st ); } - int Client::init ( ) { diff --git a/timeline/src/main.C b/timeline/src/main.C index 059f6e3..340d625 100644 --- a/timeline/src/main.C +++ b/timeline/src/main.C @@ -106,10 +106,10 @@ shift ( char **argv, int *argc, int n ) extern Timeline *timeline; void -check_osc ( void * v ) +check_nsm ( void * v ) { nsm->check(); - Fl::repeat_timeout( OSC_INTERVAL, check_osc, v ); + Fl::repeat_timeout( OSC_INTERVAL, check_nsm, v ); } static int got_sigterm = 0; @@ -210,6 +210,9 @@ main ( int argc, char **argv ) if ( ! nsm->init() ); { nsm->announce( nsm_url, APP_NAME, ":progress:switch:", argv[0] ); + + /* poll so we can keep OSC handlers running in the GUI thread and avoid extra sync */ + Fl::add_timeout( OSC_INTERVAL, check_nsm, NULL ); } } else @@ -229,19 +232,21 @@ main ( int argc, char **argv ) } - /* poll so we can keep OSC handlers running in the GUI thread and avoid extra sync */ - Fl::add_timeout( OSC_INTERVAL, check_osc, NULL ); - Fl::add_check( check_sigterm ); Fl::run(); + /* cleanup for valgrind's sake */ + if ( engine ) { delete engine; engine = NULL; } + delete timeline; + timeline = NULL; + delete tle; tle = NULL;