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

Author Topic: found some memory leaks  (Read 5501 times)

0 Members and 1 Guest are viewing this topic.

Travnick

  • Newbie
  • *
  • Posts: 12
    • View Profile
found some memory leaks
« on: February 03, 2011, 08:29:44 pm »
I made a little program. Valgrind found memory leaks in it. It look like SFML memory leaks, but it could be my mistake as well:

program code:
http://wklej.org/id/469701/

Valgrind errors:
Code: [Select]
valgrind --leak-check=full --show-reachable=yes -v --log-file=val.txt ./sfmlTest
http://wklej.org/id/469698/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
found some memory leaks
« Reply #1 on: February 03, 2011, 08:51:23 pm »
It's ok, they are under control ;)

Thanks anyway for reporting them.
Laurent Gomila - SFML developer

Travnick

  • Newbie
  • *
  • Posts: 12
    • View Profile
found some memory leaks
« Reply #2 on: February 03, 2011, 09:30:11 pm »
Quote from: "Laurent"
It's ok, they are under control ;)


so you mean that they will be fixed? in which version?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
found some memory leaks
« Reply #3 on: February 03, 2011, 11:43:57 pm »
It's a single leak, and it was produced on purpose. And it's already fixed in SFML 2.
Laurent Gomila - SFML developer

JAssange

  • Full Member
  • ***
  • Posts: 104
    • View Profile
found some memory leaks
« Reply #4 on: February 04, 2011, 12:38:13 pm »
Quote from: "Laurent"
It's a single leak, and it was produced on purpose. And it's already fixed in SFML 2.

My curiosity has the best of me with this one, what use does an intentional leak have?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
found some memory leaks
« Reply #5 on: February 04, 2011, 12:44:23 pm »
Quote
My curiosity has the best of me with this one, what use does an intentional leak have?

Not causing a crash, because the object can only be destroyed at global scope, but then there's no guaratee that everybody likes that (global exit is a mess, nobody knows the order of destruction of global objects) -- sometimes causing random crashes.
Well, I know it's a bit ugly, it was more a quick and dirty fix than a clean solution. The clean fix is in SFML 2.
Laurent Gomila - SFML developer

 

anything