Browse Source

Don't close the global stdout handle

Despite how the rest of the Win32 API expects for you to close handles,
this will apparently trash the global state. See https://devblogs.microsoft.com/oldnewthing/20130307-00/?p=5033
pull/152/head
Adam Johnson 6 years ago
parent
commit
80a7a06de9
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 3
      korman/korlib/console.py

3
korman/korlib/console.py

@ -39,9 +39,6 @@ if sys.platform == "win32":
self._handle = ctypes.windll.kernel32.GetStdHandle(-11)
self.position = _Coord(0, 0)
def __del__(self):
ctypes.windll.kernel32.CloseHandle(self._handle)
@property
def _screen_buffer_info(self):
info = _ConsoleScreenBufferInfo()

Loading…
Cancel
Save