1
Window / [SFML2] sf::Window create close memory issue
« on: December 20, 2009, 06:06:38 pm »
Ok, thanks for making that clear
No further questions!
Thx
No further questions!
Thx
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif
#include <SFML/graphics.hpp>
int main() {
sf::RenderWindow renderWindow(sf::VideoMode(800, 600, 32), "SFML Graphics");
#ifdef _DEBUG
_CrtDumpMemoryLeaks();
#endif
return EXIT_SUCCESS;
}
Detected memory leaks!
Dumping objects ->
{152} normal block at 0x01ED7A00, 16 bytes long.
Data: < > 0A 00 00 00 0D 00 00 00 06 01 00 00 CC CC CC CC
{151} normal block at 0x01ED79B0, 16 bytes long.
Data: < > 02 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC
{150} normal block at 0x01ED7950, 32 bytes long.
Data: < y z > B0 79 ED 01 00 7A ED 01 00 00 00 00 00 00 00 00
{135} normal block at 0x01ED7000, 20 bytes long.
Data: < p p p > 00 70 ED 01 00 70 ED 01 00 70 ED 01 CD CD CD CD
{134} normal block at 0x01ED3D88, 224 bytes long.
Data: < DQ > 0C 44 51 00 01 00 00 00 01 00 00 00 00 00 00 00
{133} normal block at 0x01ED3D48, 4 bytes long.
Data: < = > 88 3D ED 01
Object dump complete.
Detected memory leaks!
Dumping objects ->
{152} normal block at 0x01EE79F8, 16 bytes long.
Data: < } > 0A 00 00 00 82 00 00 00 7D 01 00 00 CC CC CC CC
{151} normal block at 0x01EE79A8, 16 bytes long.
Data: < > 02 00 00 00 CC CC CC CC CC CC CC CC CC CC CC CC
{150} normal block at 0x01EE7948, 32 bytes long.
Data: < y y > A8 79 EE 01 F8 79 EE 01 00 00 00 00 00 00 00 00
{135} normal block at 0x01EE7000, 20 bytes long.
Data: < p p p > 00 70 EE 01 00 70 EE 01 00 70 EE 01 CD CD CD CD
{134} normal block at 0x01EE3D88, 216 bytes long.
Data: <| Q > 7C 15 51 00 01 00 00 00 01 00 00 00 00 00 00 00
{133} normal block at 0x01EE3D48, 4 bytes long.
Data: < = > 88 3D EE 01
Object dump complete.
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif
#include <SFML/graphics.hpp>
INT WINAPI WinMain(HINSTANCE Instance, HINSTANCE, LPSTR, INT) {
sf::RenderWindow renderWindow(sf::VideoMode(800, 600, 32), "SFML Graphics");
while(renderWindow.IsOpened()) {
// Process events
sf::Event Event;
while (renderWindow.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
renderWindow.Close();
}
// Fill the background black
renderWindow.Clear(sf::Color(0, 0, 0, 255));
// Display window contents on screen
renderWindow.Display();
}
#ifdef _DEBUG
_CrtDumpMemoryLeaks();
#endif
return EXIT_SUCCESS;
}