1
Window / Re: Window not showing anymore
« on: October 25, 2020, 11:17:05 am »
The issue was in fact related to my misuse of "new". I was saving the pointer into a class that granted global access, similarly to a singleton:
------
Renderer.h
#pragma once
#include "SFML\Graphics\RenderWindow.hpp"
extern sf::RenderWindow* g_window;
-------
-------
Renderer.cpp
#include "Renderer.h"
sf::RenderWindow* g_window;
-------
However, I was forgetting to delete the instance when closing the program. I imagine that after a number of times there was too much leaked memory. Simply had to restart my PC.
------
Renderer.h
#pragma once
#include "SFML\Graphics\RenderWindow.hpp"
extern sf::RenderWindow* g_window;
-------
-------
Renderer.cpp
#include "Renderer.h"
sf::RenderWindow* g_window;
-------
However, I was forgetting to delete the instance when closing the program. I imagine that after a number of times there was too much leaked memory. Simply had to restart my PC.