WIN-27: _Jv_Malloc instead of new

Adam Megacz patches@lists.megacz.com
Sun Feb 24 18:21:00 GMT 2002


committed as shown below.

  - a

2002-02-24  Adam Megacz  <adam@xwt.org>

        * win32-threads.cc (_Jv_ThreadInitData): _Jv_Malloc instead of new
        * win32-threads.cc (_Jv_ThreadDestroyData): _Jv_Free instead of
        delete

Index: win32-threads.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/win32-threads.cc,v
retrieving revision 1.7
diff -u -r1.7 win32-threads.cc
--- win32-threads.cc    2002/02/07 19:26:02     1.7
+++ win32-threads.cc    2002/02/25 01:59:30
@@ -173,7 +173,7 @@
 _Jv_Thread_t *
 _Jv_ThreadInitData (java::lang::Thread* obj)
 {
-  _Jv_Thread_t *data = new _Jv_Thread_t;
+  _Jv_Thread_t *data = (_Jv_Thread_t*)_Jv_Malloc(sizeof(_Jv_Thread_t));
   data->flags = 0;
   data->thread_obj = obj;
 
@@ -183,7 +183,7 @@
 void
 _Jv_ThreadDestroyData (_Jv_Thread_t *data)
 {
-  delete data;
+  _Jv_Free(data);
 }
 
 void



More information about the Java-patches mailing list