by closing using console i mean pressing the X on the console window when project is compiled as console application
int main()
{
sfg::SFGUI eh;
std::cin.get();//press console window X to crash or enter to quit alright
}
I thought it's default deja vu font acting like sfml's old default font but after removing it, I still get crash on exit.
removing it = I recompiled without default font so it was not it but since error is like with default font I thought your is same
crash means a very exciting msvc 2010 window saying:
Unhandled exception at 0x08e9a4cc in EddysTestbed10.exe: 0xC0000005: Access violation reading location 0x000007f0.
and error pointing to disassembly(exactly what default font did in sfml)
I also got(in my older project) similar errro by a bad singleton pattern, using pointer there solved it, so i dug into your code but you
are using a pointer for the singleton already.. maybe because it's a smart ptr there is a problem, or maybe im doing something wrong
But since:
Closing the console is not a clean way to end a program. Closing a program by an external source is never clean, only controlled termination within the program itself is clean.
I'm not sure if it's not meant to happen which is not a big dealreally, just change settings so that console doesn't show up since it's for debugging purposes only anyway(could also redirect the cout and cerr somewhere reasonable).