]> granicus.if.org Git - nethack/commit
tty memory management at program termination
authorPatR <rankin@nethack.org>
Wed, 11 Nov 2015 09:43:03 +0000 (01:43 -0800)
committerPatR <rankin@nethack.org>
Wed, 11 Nov 2015 09:43:03 +0000 (01:43 -0800)
commitf97c3dec0a6df743165868ad53c1adaa878749b1
tree8fabb549785b5c13f8cd6c1288201f3e3b904b35
parentcbeb562d2035576829b89aa0bfd9df58d1273890
tty memory management at program termination

Release some dynamically allocated memory prior to exit.  These were
previously left alone due to assumed complexity (at least by me...),
but dealing with them turned out to be straightforward.

|#if FREE_ALL_MEMORY
 free BASE_WINDOW  -- tty-specific; other windows are drawn on top of it
 free ttyDisplay   -- tty's basic data structure
|#endif
 free nh_HI, nh_HE -- termcap values handled differently from the rest

These are the last things that 'heaputil' always reported as not freed
for the basic Unix+tty configuration.  (I've observed other things not
being freed; those are post-3.4.3 bugs that need to be found and fixed.)
win/tty/termcap.c
win/tty/wintty.c