mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
The X/Open curses specification[0] and ncurses documentation[1] both state that subwindows must be deleted before the main window. Deleting the windows in the wrong order causes a double-free with NetBSD's curses implementation. To fix this, keep track of the original window object in the subwindow object, and keep a reference to the original for the lifetime of the subwindow. [0] https://pubs.opengroup.org/onlinepubs/7908799/xcurses/delwin.html [1] https://invisible-island.net/ncurses/man/curs_window.3x.html Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 lines
133 B
ReStructuredText
2 lines
133 B
ReStructuredText
Keep a reference to original :mod:`curses` windows in subwindows so
|
|
that the original window does not get deleted before subwindows.
|