MemLeak with wxWidgets

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

MemLeak with wxWidgets

Post by santajuicylove »

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.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: MemLeak with wxWidgets

Post by DavidGH »

Hi,

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.
Regards,

David
Post Reply