diff options
author | P. J. McDermott <pjm@nac.net> | 2011-12-14 17:23:47 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2011-12-14 17:36:20 (EST) |
commit | 81de5ae77d6a5f5538ce9aff0eb9ebb009dba31d (patch) | |
tree | 88719695652839ef764eef0bd2a9edb24a459004 | |
parent | 1bd516fda441eb832a1b8b3eb7ad808e2896d1fc (diff) | |
download | cgol-81de5ae77d6a5f5538ce9aff0eb9ebb009dba31d.zip cgol-81de5ae77d6a5f5538ce9aff0eb9ebb009dba31d.tar.gz cgol-81de5ae77d6a5f5538ce9aff0eb9ebb009dba31d.tar.bz2 |
Fix an uneventful memory leak.
Curses libraries don't seem to free stdscr or the terminal screen
created when initscr() calls newterm(). We can free stdscr ourselves
when leaving Curses, but the terminal screen address isn't even saved in
ncurses for example. This is apparently a bug in the X/Open Curses
specification.
See also:
<http://pubs.opengroup.org/onlinepubs/007908799/xcurses/initscr.html>
<http://pubs.opengroup.org/onlinepubs/007908799/xcurses/endwin.html>
ncurses/base/lib_initscr.c:87 in ncurses 5.8+20110307
-rw-r--r-- | src/cgol.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -172,6 +172,7 @@ fini_game() void fini_curses() { + delwin(stdscr); endwin(); } |