# HG changeset patch # User Thinker K.F. Li # Date 1227065161 -28800 # Node ID 923d91dfb6af246683a9122ae91e9ed1f2cd1c24 # Parent 54fdc2a65242dd8d2443ecd3f0eaf36c530d968d Hide bang before completed and remove progm after completed. - Bang graphics was hidden, not removed. - Bang graphics should be freed in some day future. diff -r 54fdc2a65242 -r 923d91dfb6af examples/tank/tank_main.c --- a/examples/tank/tank_main.c Tue Nov 18 21:42:30 2008 +0800 +++ b/examples/tank/tank_main.c Wed Nov 19 11:26:01 2008 +0800 @@ -392,7 +392,16 @@ word = mb_progm_next_word(progm, &start, &playing); mb_visibility_new(VIS_VISIBLE, bang->root_coord, word); - /*! \todo Remove bang and program when program stops. */ + MB_TIMEVAL_SET(&start, 2, 500000); + word = mb_progm_next_word(progm, &start, &playing); + mb_visibility_new(VIS_HIDDEN, bang->root_coord, word); + + mb_progm_free_completed(progm); + + /*! \todo Remove bang when program is completed. + * The graphics are not removed from rdman after progm is completed, now. + * They should be freed to release resources. + */ get_now(&now); mb_progm_start(progm, tman, &now); }