Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Messages - Zerd

Pages: [1]
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

2
Window / [SFML2] sf::Window create close memory issue
« on: December 20, 2009, 03:11:26 pm »
Thanks Nexus,

I tested it for myself as well again usingn new and delete with the renderWindow. Which got me to the same result (3 leaks)

What I don't understand is why the memory is freed after the dump-call and not directly when renderWindow is destroyd?

I assume RenderWindow creates a thread. So it makes sence that memory is allocated until main() finished and the thread is terminated. But wouldn't it make more sence to kill the thread when the RenderWindow is destroyed (for example after using "delete renderWindow;" )? That way the memory dump should be ok.

I'm just curious if that might be a solution?

3
Window / [SFML2] sf::Window create close memory issue
« on: December 18, 2009, 12:00:23 pm »
Alone this code creates a leak:

Code: [Select]
#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;
}

4
Window / [SFML2] sf::Window create close memory issue
« on: December 18, 2009, 09:59:40 am »
Yes, branches/sfml2

With the same source I posted earlier...

5
Window / [SFML2] sf::Window create close memory issue
« on: December 17, 2009, 10:03:34 pm »
I'm sorry to say that, but with the latest svn version it's still leaking  :oops:

6
Window / [SFML2] sf::Window create close memory issue
« on: December 16, 2009, 10:52:43 pm »
Doh... OK, I'll try again tomorrow... :)

7
Window / [SFML2] sf::Window create close memory issue
« on: December 16, 2009, 10:14:52 pm »
I just downloaded and built the latest trunk and it's still leaking. So I guess its not the same problem ;)

Quote
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.

8
Window / [SFML2] sf::Window create close memory issue
« on: December 16, 2009, 09:20:22 pm »
Sorry, I'm not using version 2 I'm using 1.5 for Visual Studio 2008 (on a x64 pc)
I suppose I also am in the wrong forum... :( I'm sorry for that...

Quote
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.


Thats my problem, it doesn't really say where the memory is leaking...

9
Window / [SFML2] sf::Window create close memory issue
« on: December 16, 2009, 09:05:28 pm »
Hi!

Did you manage do find the leak on windows?
I started using sfml and almost directly ran into this leak by using this code:
Code: [Select]
#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;
}


Is there a way to fix this issue?
Thank you
- Zerd

*edit*
Sorry its not really related to this topic, I'm using SFML-1.5 for VS2008

Pages: [1]