First pass memory tool
This commit is contained in:
1 parent
2423fd9f70
commit
9ad9995663
11 files changed
+183
-99
No files matched your search
@@ -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