First pass memory tool
This commit is contained in:
@ -155,12 +155,22 @@ int32_t DawnHost::update(DawnGame *game, float_t delta) {
|
||||
}
|
||||
|
||||
void DawnHost::unload(DawnGame *game) {
|
||||
glfwDestroyWindow(this->data->window);
|
||||
this->data->window = nullptr;
|
||||
glfwTerminate();
|
||||
assertNotNull(game, "DawnHost::unload: game must not be null");
|
||||
assertNotNull(this->data, "DawnHost::unload: data must not be null");
|
||||
if(this->data->window != nullptr) {
|
||||
glfwDestroyWindow(this->data->window);
|
||||
this->data->window = nullptr;
|
||||
glfwTerminate();
|
||||
}
|
||||
}
|
||||
|
||||
DawnHost::~DawnHost() {
|
||||
assertNotNull(this->data, "DawnHost::~DawnHost: data must not be null");
|
||||
if(this->data->window != nullptr) {
|
||||
glfwDestroyWindow(this->data->window);
|
||||
this->data->window = nullptr;
|
||||
glfwTerminate();
|
||||
}
|
||||
delete this->data;
|
||||
DAWN_HOST = nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user