changeset 193:923d91dfb6af

Hide bang before completed and remove progm after completed. - Bang graphics was hidden, not removed. - Bang graphics should be freed in some day future.
author Thinker K.F. Li <thinker@branda.to>
date Wed, 19 Nov 2008 11:26:01 +0800
parents 54fdc2a65242
children 45d9a1e2764d
files examples/tank/tank_main.c
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }