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

Author Topic: Memory Leaks  (Read 3060 times)

0 Members and 1 Guest are viewing this topic.

PferdOne

  • Newbie
  • *
  • Posts: 2
    • View Profile
Memory Leaks
« on: July 27, 2009, 04:34:57 pm »
First of all thanks for the great library, Laurent! Second, I get some memory leaks with your library, though it doesn't seem to grow more over time I like to quit my apps with a clean debug console. :)

this is my code:
Code: [Select]
#include <vld.h>
#include <sfml/Graphics.hpp>

int main() {
  sf::RenderWindow rw(sf::VideoMode(640, 480), "Leak Test");
  return 0;
}


Visual Leak Detector tells me this:
Code: [Select]
WARNING: Visual Leak Detector detected memory leaks!
---------- Block 0 at 0x01A63D20: 4 bytes ----------
  Call Stack:
    0x004E11C2 (File and line number not available): sf::Context::GetGlobal
    0x004F5DD3 (File and line number not available): FreeLibrary
    f:\sp\vctools\crt_bld\self_x86\crt\src\crt0dat.c (855): _initterm
    f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (512): __tmainCRTStartup
    f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (414): mainCRTStartup
    0x7C817067 (File and line number not available): RegisterWaitForInputIdle
...

---------- Block 2 at 0x01A63D60: 20 bytes ----------
  Call Stack:
    0x004E9454 (File and line number not available): std::_Allocate<std::_Tree_nod<std::_Tset_traits<sf::WindowListener *,std::less<sf::WindowListener *>,std::allocator<sf::WindowListener *>,0> >::_Node>
    0x004E8BFE (File and line number not available): std::allocator<std::_Tree_nod<std::_Tset_traits<sf::WindowListener *,std::less<sf::WindowListener *>,std::allocator<sf::WindowListener *>,0> >::_Node>::allocate
    0x004E88F3 (File and line number not available): std::_Tree<std::_Tset_traits<sf::WindowListener *,std::less<sf::WindowListener *>,std::allocator<sf::WindowListener *>,0> >::_Buynode
    0x004E771B (File and line number not available): std::_Tree<std::_Tset_traits<sf::WindowListener *,std::less<sf::WindowListener *>,std::allocator<sf::WindowListener *>,0> >::_Init
    0x004E581F (File and line number not available): std::_Tree<std::_Tset_traits<sf::WindowListener *,std::less<sf::WindowListener *>,std::allocator<sf::WindowListener *>,0> >::_Tree<std::_Tset_traits<sf::WindowListener *,std::less<sf::WindowListener *>,std::allocator<sf::WindowListener *>,0> >
    0x004E498E (File and line number not available): std::set<sf::WindowListener *,std::less<sf::WindowListener *>,std::allocator<sf::WindowListener *> >::set<sf::WindowListener *,std::less<sf::WindowListener *>,std::allocator<sf::WindowListener *> >
    0x004E3D26 (File and line number not available): sf::priv::WindowImpl::WindowImpl
    0x004E978A (File and line number not available): sf::priv::WindowImplWin32::WindowImplWin32
    0x004E3A4B (File and line number not available): sf::priv::WindowImpl::New
    0x004E0FC0 (File and line number not available): sf::Context::Context
    0x004E11E3 (File and line number not available): sf::Context::GetGlobal
    0x004F5DD3 (File and line number not available): FreeLibrary
    f:\sp\vctools\crt_bld\self_x86\crt\src\crt0dat.c (855): _initterm
    f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (512): __tmainCRTStartup
    f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (414): mainCRTStartup
    0x7C817067 (File and line number not available): RegisterWaitForInputIdle
...

---------- Block 1 at 0x01A67008: 216 bytes ----------
  Call Stack:
    0x004E3A27 (File and line number not available): sf::priv::WindowImpl::New
    0x004E0FC0 (File and line number not available): sf::Context::Context
    0x004E11E3 (File and line number not available): sf::Context::GetGlobal
    0x004F5DD3 (File and line number not available): FreeLibrary
    f:\sp\vctools\crt_bld\self_x86\crt\src\crt0dat.c (855): _initterm
    f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (512): __tmainCRTStartup
    f:\sp\vctools\crt_bld\self_x86\crt\src\crtexe.c (414): mainCRTStartup
    0x7C817067 (File and line number not available): RegisterWaitForInputIdle
...


I'm using Windows XP (Sp3) with VS2005 (Sp1). SFML is of version 1.5 and Visual Leak Detector 1.9g. Thanks in advance.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Memory Leaks
« Reply #1 on: July 27, 2009, 04:55:28 pm »
It is in the roadmap for SFML 2.0, and it's already fixed.
Laurent Gomila - SFML developer

PferdOne

  • Newbie
  • *
  • Posts: 2
    • View Profile
Memory Leaks
« Reply #2 on: July 27, 2009, 05:13:35 pm »
Oh ok, thanks for the quick answer. Looking forward to SFML 2.0.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Memory Leaks
« Reply #3 on: July 27, 2009, 06:06:15 pm »
You can already now use the sfml-2 branch via SVN.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: