From 81de5ae77d6a5f5538ce9aff0eb9ebb009dba31d Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 14 Dec 2011 17:23:47 -0500 Subject: 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: ncurses/base/lib_initscr.c:87 in ncurses 5.8+20110307 --- diff --git a/src/cgol.c b/src/cgol.c index b779961..b4b95e7 100644 --- a/src/cgol.c +++ b/src/cgol.c @@ -172,6 +172,7 @@ fini_game() void fini_curses() { + delwin(stdscr); endwin(); } -- cgit v0.9.1