Hi, I need confirmation on this bug before I post an issue on GitHub:
http://stackoverflow.com/a/44074908/5044558As the answer states, it looks like a line in Font.cpp is incorrect?
https://github.com/SFML/SFML/blob/master/src/SFML/Graphics/Font.cpp#L561Working with SFML 2.4.2 on Windows 7 64-bit version, I've noticed an issue with sf::Text::setOutlineThickness(float). Once it is used in the program, except for default value 0, crtdbg dumps a memory leak of various sizes of bytes but always the same amount. I believe this is related to the size of the string, if the text gets drawn, and if the parameter of setOutlineThickness is accepted, demonstrated here:
/// Initial set-up
sf::Text test;
test.setString("A");
// ... Set charactersize, font, fillcolor, etc ...
test.setOutlineThickness(1);
test.setOutlineColor(sf::Color::Black);
/// Make a drawcall for test later in the program
void Game::draw(sf::RenderTarget & target, sf::RenderStates states) const
{
target.draw(test, states);
}
This produces a leak the size of the string, i.e. "A":
{8601} normal block at 0x0000000005CA5C90, 60 bytes long.
Data: < > 03 00 07 00 0B 00 0F 00 13 00 17 00 1B 00 1F 00
{8600} normal block at 0x0000000005E03A20, 120 bytes long.
Data: < > 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
{8599} normal block at 0x0000000005E2A680, 960 bytes long.
Data: < > 00 00 00 00 80 07 00 00 0D 01 00 00 80 07 00 00
{8598} normal block at 0x0000000005CA36B0, 72 bytes long.
Data: < h > F0 1A 9D 05 00 00 00 00 68 AE 83 DB FE 07 00 00
I could expand more from my question on StackOverflow if this isn't enough.
This person has the same problem but I wasn't sure if I should revive the post.
https://en.sfml-dev.org/forums/index.php?topic=21391.0