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 - jsalo

Pages: [1]
1
Window / Handle leak
« on: January 13, 2017, 08:56:37 am »
I noticed this handle count increasing while working on one of my projects. At first I tried to find out if this is something I did wrong. Went back to test and I'm running this minimalistic code right now and the handle count is still increasing constantly.

#include <Windows.h>
#include <SFML\Window.hpp>

int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, int nCmdShow)
{
        sf::Window window(sf::VideoMode(800, 600), "My window");

        // run the program as long as the window is open
        while (window.isOpen())
        {
                // check all the window's events that were triggered since the last iteration of the loop
                sf::Event event;
                while (window.pollEvent(event))
                {
                        // "close requested" event: we close the window
                        if (event.type == sf::Event::Closed)
                                window.close();
                }
        }

        return 0;
}
 

Tested with vc12 and vc14 latest 2.4.1 version.
Any clue what's going on here? I let the program run all the way up to 40K Handles and it never stopped climbing.

Short video, Windows Task Manager

Pages: [1]
anything