SFML community forums
Help => Window => Topic started by: transient on August 21, 2009, 08:14:37 pm
-
I have a few quick questions about windows:
I'm creating a window as such.
// Create the window settings
sf::WindowSettings settings;
settings.DepthBits = 32;
settings.StencilBits = 8;
settings.AntialiasingLevel = 2;
// Create the window
sf::Window* window = (new sf::Window(sf::VideoMode(dim.x, dim.y, 32), "abc", sf::Style::Close | sf::Style::Titlebar | sf::Style::Resize, settings));
Now, the title of the window ends up being something like this "LLLLabc" (a weird ascii L though.)
Also, when I call
delete window;
I get a memory error.
Any ideas why? Thanks
-
I have a few quick questions about windows:
I'm creating a window as such.
// Create the window settings
sf::WindowSettings settings;
settings.DepthBits = 32;
settings.StencilBits = 8;
settings.AntialiasingLevel = 2;
// Create the window
sf::Window* window = (new sf::Window(sf::VideoMode(dim.x, dim.y, 32), "abc", sf::Style::Close | sf::Style::Titlebar | sf::Style::Resize, settings));
Now, the title of the window ends up being something like this "LLLLabc" (a weird ascii L though.)
:arrow: http://www.sfml-dev.org/forum/viewtopic.php?t=1257&highlight=title
Also, when I call
delete window;
I get a memory error.
Any ideas why? Thanks
Because you delete your window in the wrong way : I mean you use it afterwards.
But with a minimal code that reproduce the error we could say more than an hypothetical cause.
-
Linking to release libraries while compiling in debug mode isn't always the smartest idea...
Thanks.
(Also, I was not using the window after I deleted it, but that is of minimal consequence now. Also, I thought I gave just enough code to reproduce the issue. To each their own.)