equal
deleted
inserted
replaced
89 |
89 |
90 case SDLK_RIGHT: |
90 case SDLK_RIGHT: |
91 for (i = 0; i < MAX; i++) |
91 for (i = 0; i < MAX; i++) |
92 d[i]->move ((Vector (x + STEP, y))); |
92 d[i]->move ((Vector (x + STEP, y))); |
93 break; |
93 break; |
|
94 |
|
95 case SDLK_RETURN: |
|
96 fprintf (stderr, "Objects remaining: %d\n", surface->getInstances ()); |
|
97 break; |
|
98 |
94 default: |
99 default: |
95 break; |
100 break; |
96 } |
101 } |
97 |
102 |
98 for (i = 0; i < MAX; i++) { |
103 for (i = 0; i < MAX; i++) { |
106 for (i = 0; i < MAX; i++) |
111 for (i = 0; i < MAX; i++) |
107 delete d[i]; |
112 delete d[i]; |
108 |
113 |
109 delete surface; |
114 delete surface; |
110 |
115 |
|
116 /* |
|
117 * the remaining objects will be removed on exit |
|
118 */ |
|
119 fprintf (stderr, "Objects remaining on exit: %d\n", refCounter); |
|
120 |
111 return EXIT_SUCCESS; |
121 return EXIT_SUCCESS; |
112 } |
122 } |