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

Author Topic: Graphics memory leak  (Read 2290 times)

0 Members and 2 Guests are viewing this topic.

MthDc

  • Newbie
  • *
  • Posts: 8
    • View Profile
Graphics memory leak
« on: March 21, 2013, 10:51:15 am »
I detected a memory leak in my application using SFML 2 and went to investigate using the _CrtDumpMemoryLeaks() method in Visual Studio 2010. All of my allocated pointers are properly being deleted(I triple checked this), but the tool reported a leak in sfml-graphics.dll (more precisely when rendering a sprite using the method window.draw(image), where image is an instance of sf::Sprite.

Surely, if this really is an issue of SFML, I can not continue to use this library for serious projects.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Graphics memory leak
« Reply #1 on: March 21, 2013, 11:13:53 am »
People will probably want a complete and minimal example where the supposed leak can be observed. :p

Roose Bolton of the Dreadfort

  • Full Member
  • ***
  • Posts: 113
  • Full-time Procrastinator, Part-time programmer.
    • View Profile
    • Personal Portfolio/Website/Blog
Re: Graphics memory leak
« Reply #2 on: March 21, 2013, 11:27:42 am »
So you generally think that after the thousands of people who used SFML and hundreds of indie games, you have noticed a memory leak no1 else has, and that it might be SFML and not you.

No, SFML doesn't have a memory leak

Your first problem is using CRT as that can cause false positives, use a proper memory detection program like IBM Rational Purify or VLD http://vld.codeplex.com/
Trying so very hard to finish at-least one project.

Watch out for the RAII police, they will get you.

www.bantersaurus-games.com

MthDc

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Graphics memory leak
« Reply #3 on: March 21, 2013, 11:28:54 am »
Thank you for the links to the other tools. I will check them out and reply soon with my findings.

EDIT: Turned out it was indeed a false positive. Excuse my false accusations.
« Last Edit: March 21, 2013, 11:41:14 am by MthDc »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Graphics memory leak
« Reply #4 on: March 21, 2013, 02:27:30 pm »
There have been many non-justified reports of memory leaks in the past. You can search the forum to know more about them.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything