natThread.cc (finalize_native): Destroy join conditional variable and mutex if...
authorMohan Embar <gnustuff@thisiscool.com>
Sat, 11 Sep 2004 19:10:44 +0000 (19:10 +0000)
committerMohan Embar <membar@gcc.gnu.org>
Sat, 11 Sep 2004 19:10:44 +0000 (19:10 +0000)
* java/lang/natThread.cc (finalize_native): Destroy
join conditional variable and mutex if these destroy
operations are supported.

From-SVN: r87361

libjava/ChangeLog
libjava/java/lang/natThread.cc

index 1bd4ccc34c599ea8c00384326ed42761c3bb3391..d3a6cea9bbae9c403ac2a9c403305248adf641ec 100644 (file)
@@ -1,3 +1,9 @@
+2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
+
+       * java/lang/natThread.cc (finalize_native): Destroy
+       join conditional variable and mutex if these destroy
+       operations are supported.
+
 2004-09-10  Dalibor Topic <robilad@kaffe.org>
 
        * gnu/java/net/protocol/file/Connection.java (permission): New field.
index ea235ce378979ed74a7ef34523336e3dd1e6d2bc..4782115d2cfedb6c1d7f0682bc58ec760799575c 100644 (file)
@@ -78,6 +78,12 @@ finalize_native (jobject ptr)
 {
   natThread *nt = (natThread *) ptr;
   _Jv_ThreadDestroyData (nt->thread);
+#ifdef _Jv_HaveCondDestroy
+  _Jv_CondDestroy (&nt->join_cond);
+#endif
+#ifdef _Jv_HaveMutexDestroy
+  _Jv_MutexDestroy (&nt->join_mutex);
+#endif
 }
 
 jint