Call CloseHandle from ~windows_thread_info

Add a destructor to windows_thread_info that calls CloseHandle.

gdb/ChangeLog
2020-04-08  Tom Tromey  <tromey@adacore.com>

	* nat/windows-nat.h (struct windows_thread_info): Declare
	destructor.
	* nat/windows-nat.c (~windows_thread_info): New.

gdbserver/ChangeLog
2020-04-08  Tom Tromey  <tromey@adacore.com>

	* win32-low.c (delete_thread_info): Don't call CloseHandle.
This commit is contained in:
Tom Tromey
2020-04-08 14:33:35 -06:00
parent 0a4afda3c6
commit 65bafd5b15
5 changed files with 17 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
2020-04-08 Tom Tromey <tromey@adacore.com>
* win32-low.c (delete_thread_info): Don't call CloseHandle.
2020-04-08 Tom Tromey <tromey@adacore.com>
* win32-low.c (win32_require_context, suspend_one_thread): Use

View File

@@ -218,7 +218,6 @@ delete_thread_info (thread_info *thread)
windows_thread_info *th = (windows_thread_info *) thread_target_data (thread);
remove_thread (thread);
CloseHandle (th->h);
delete th;
}