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

Author Topic: Memory leaks in wxSFMLCanvas (wxWidgets example)  (Read 1504 times)

0 Members and 1 Guest are viewing this topic.

djzmo

  • Newbie
  • *
  • Posts: 8
    • View Profile
Memory leaks in wxSFMLCanvas (wxWidgets example)
« on: April 27, 2010, 09:02:17 pm »
Hello there,

I followed this article: http://www.sfml-dev.org/tutorials/1.6/graphics-wxwidgets.php ..to integrate SFML 1.6 to wxWidgets.

I later used the provided custom wxSFMLCanvas control to add the SFML RenderWindow into my wxWidgets application, and I always get these memory leaks error every time I quit the application:

Quote
Detected memory leaks!
Dumping objects ->
{126} normal block at 0x003969A8, 20 bytes long.
 Data: < i9  i9  i9     > A8 69 39 00 A8 69 39 00 A8 69 39 00 CD CD CD CD
{125} normal block at 0x003967E0, 392 bytes long.
 Data: <                > A0 15 8F 00 01 00 00 00 01 00 00 00 00 00 00 00
{124} normal block at 0x003967A0, 4 bytes long.
 Data: < g9 > E0 67 39 00
Object dump complete.


So I tried to compile the source code from the tutorial (graphics-wxwidgets.cpp, wxSFMLCanvas.hpp, wxSFMLCanvas.cpp) under Microsoft Visual C++ 2008 to make sure that the leak didn't came from my codes, and yes, I got the same memory leaks.

I also tried to use the automatic leak detection by adding these lines on top of my source codes (as stated here: http://wiki.wxwidgets.org/Avoiding_Memory_Leaks):

Code: [Select]
#ifdef __WXMSW__
    #include <wx/msw/msvcrt.h>
#endif


But no success. It didn't show which files/lines caused that 3 leaks.

Is there a fix to this issue?

I am using SFML 1.6 with wxWidgets 2.8.10.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Memory leaks in wxSFMLCanvas (wxWidgets example)
« Reply #1 on: April 27, 2010, 10:10:29 pm »
Hi, I don't think the stated memory leaks are real. We have already had issues with memory leak control tools detecting correctly deallocated memory. See this thread – my post explains the problem.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: