1
General discussions / Creating a new sf::Event object in each loop?
« on: September 30, 2017, 06:07:45 pm »
Hello, everyone! I have a question about most SFML code I see. Why are they redeclaring an sf::Event object after while(Window.IsOpened()). Wouldn't this cause the sf::Event constructor to be called each time creating a new object and hurting performance slightly? Is there any difference in declaring sf::Event before the main window loop?