struct program *program_destroy(struct program *program) { ASSERT_PROGRAM(program); while(program->extra_number) { program->extra[program->extra_number--] = FREE(program->extra[program->extra_number--]); } if(program->glfw_initialized) window_terminate(); return FREE(program); }
void window_destroy(struct window_t* w) { window_terminate(w); free(w); }