You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the time of writing, there is a potential memory leak in certain functions. For example, when creating a window the structure is allocated on the heap and if the actual window creation function call fails then this simply returns without freeing the previously allocated memory. Below is an example of this:
window_t* window = new window_t();
glfwSetErrorCallback(glfw_error_callback);
if (!glfwInit()) {
logger::err("Failed to initialize GLFW");
return nullptr;
}
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
glfwWindowHint(GLFW_RESIZABLE, true);
window->handle = glfwCreateWindow(width, height, name, nullptr, nullptr);
window->name = name;
window->width = width;
window->height = height;
if (!window->handle) {
logger::err("Failed to create GLFW window");
return nullptr;
}
The text was updated successfully, but these errors were encountered:
At the time of writing, there is a potential memory leak in certain functions. For example, when creating a window the structure is allocated on the heap and if the actual window creation function call fails then this simply returns without freeing the previously allocated memory. Below is an example of this:
The text was updated successfully, but these errors were encountered: