| 364 | } |
| 365 | |
| 366 | void cleanup(int code) |
| 367 | { |
| 368 | if (g_pRng) { |
| 369 | delete g_pRng; |
| 370 | g_pRng = NULL; |
| 371 | } |
| 372 | |
| 373 | if (g_pVertices) { |
| 374 | delete[] g_pVertices; |
| 375 | g_pVertices = NULL; |
| 376 | } |
| 377 | |
| 378 | if (g_pCheckRender) { |
| 379 | delete g_pCheckRender; |
| 380 | g_pCheckRender = NULL; |
| 381 | } |
| 382 | |
| 383 | exit(code); |
| 384 | } |
| 385 | |
| 386 | void glutClose() { cleanup(EXIT_SUCCESS); } |
| 387 |