Use new and delete for windows_thread_info
[deliverable/binutils-gdb.git] / gdbserver / win32-low.cc
index 55e8322cebbe89d6ecc8467da3915b07440a90ae..1284ed177cb5497fe80ed45ec1735f46da2c6727 100644 (file)
@@ -212,10 +212,7 @@ child_add_thread (DWORD pid, DWORD tid, HANDLE h, void *tlb)
   if ((th = thread_rec (ptid, FALSE)))
     return th;
 
-  th = XCNEW (windows_thread_info);
-  th->tid = tid;
-  th->h = h;
-  th->thread_local_base = (CORE_ADDR) (uintptr_t) tlb;
+  th = new windows_thread_info (tid, h, (CORE_ADDR) (uintptr_t) tlb);
 
   add_thread (ptid, th);
 
@@ -233,7 +230,7 @@ delete_thread_info (thread_info *thread)
 
   remove_thread (thread);
   CloseHandle (th->h);
-  free (th);
+  delete th;
 }
 
 /* Delete a thread from the list of threads.  */
This page took 0.023696 seconds and 4 git commands to generate.