1curs_memleaks(3X)                                            curs_memleaks(3X)
2
3
4

NAME

6       _nc_freeall _nc_free_and_exit - curses memory-leak checking
7

SYNOPSIS

9       #include <curses.h>
10
11       void _nc_freeall(void);
12       void _nc_free_and_exit(int);
13

DESCRIPTION

15       These  functions  are  used to simplify analysis of memory leaks in the
16       ncurses library.  They are normally not available; they must be config‐
17       ured  into  the library at build time using the --disable-leaks option.
18       That compiles-in code that frees memory  that  normally  would  not  be
19       freed.
20
21       Any implementation of curses must not free the memory associated with a
22       screen, since (even after calling endwin), it must be available for use
23       in  the next call to refresh.  There are also chunks of memory held for
24       performance reasons.  That makes it hard to analyze curses applications
25       for  memory leaks.  To work around this, one can build a debugging ver‐
26       sion of the ncurses library which frees those chunks which it can,  and
27       provides  these  functions  to  free all of the memory allocated by the
28       ncurses library.
29
30       The _nc_free_and_exit function is the preferred one since some  of  the
31       memory  which  is freed may be required for the application to continue
32       running.  Its parameter is the code to pass to the exit routine.
33

RETURN VALUE

35       These functions do not return a value.
36

PORTABILITY

38       These functions are not part of the XSI interface.
39

SEE ALSO

41       curses(3X).
42
43
44
45                                                             curs_memleaks(3X)
Impressum