On Sun, 3 Aug 2008, brian m. carlson wrote:

I personally don't believe refresh is required to work after a
delwin(stdscr), since

 Calling delwin deletes the named window, freeing all memory associated
 with it....

except that it doesn't free all the memory associated with it.  It does
free *some* of it, but not all.  I don't see any possible objection to
freeing all the related memory in this case, since calling refresh would
invoke undefined behavior.

looking through the list, I don't see any memory related to delwin which is allocated (there are several chunks, and they all appear to be in the category covered by --disable-leaks). Specifically, most of the memory allocated by newterm and initscr, since those create more than one window, and allocate memory which is not tied to any of those windows.

It _might_ be useful for the Debian debugging library for ncurses to have this (disable-leaks) feature enabled. The drawback is that the behavior would differ (as it already does for the tracing functions), and that an application would have to call a special function to free the permanent mallocs.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to