mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-28 09:38:38 +00:00
Hide false memleaks in a debugbuild
This makes sure valgrind doesn't show false memleaks that are caused by ncurses instead of our code when we do a 'Debug' build. There is a also a disadvantage: When your ncurses library is not build with the '--disable-leaks' option (this is the case in the default version of ncurses of most distro's) and you build conky with ncurses and debug turned on then you will see a segmentation fault when you stop conky. On the other hand people that want to build conky as a debug build with ncurses support will probably also have a ncurses with --disable-leaks ...
This commit is contained in:
parent
c7fa36a5f2
commit
f695ed58d9
@ -66,6 +66,9 @@
|
|||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#ifdef BUILD_NCURSES
|
#ifdef BUILD_NCURSES
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#ifdef DEBUG
|
||||||
|
#include "nc.h"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef BUILD_WEATHER_XOAP
|
#ifdef BUILD_WEATHER_XOAP
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
@ -4341,6 +4344,9 @@ int main(int argc, char **argv)
|
|||||||
kvm_close(kd);
|
kvm_close(kd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(BUILD_NCURSES) && defined(DEBUG)
|
||||||
|
_nc_free_and_exit(0); //hide false memleaks
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user