MemLeak with wxWidgets

General questions regarding the usage of CodeLite
CodeLite Curious
Posts: 2
Joined: Fri Oct 19, 2018 11:31 am
Genuine User: Yes
IDE Question: c++

MemLeak with wxWidgets

Post by santajuicylove » Fri Oct 19, 2018 11:43 am

I'm using codelite with GNU/g++, wxWidgets-3.1.1 and wxFormBuilder or wxCraftor.
When I run my project with wxWidgets under MemCheck, it always show many memory Leaks,even the project is auto genarate by ide.
For console application, no memory leak detected.
I want to know why.

CodeLite Plugin
Posts: 659
Joined: Wed Sep 03, 2008 7:26 pm

Re: MemLeak with wxWidgets

Post by DavidGH » Fri Oct 19, 2018 1:21 pm


Memcheck uses Valgrind, which always outputs large numbers of false-positive leaks with wxWidgets code; see e.g.
this wxwiki page (which I must remember to update).

I'd say you have 3 choices:
  • 1) Look through the supposed leaks. Fix any that really come from your code bugs, and allow Memcheck to add the rest to its suppression file.
    2) Add a separate suppression file; then goto 1)
    3) Use Valgrind directly instead of via Memcheck.


Post Reply