diff options
author | stanleyk <stanleyk@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-02-18 18:41:09 +0000 |
---|---|---|
committer | stanleyk <stanleyk@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-02-18 18:41:09 +0000 |
commit | aa215fd615491d8cefa53d1cc1dfd6ac1b6d1eed (patch) | |
tree | d73cd6bb31dec0ace060d27d366eef6dbc9dfd72 /TAO/tests | |
parent | 27205fc4d8ae46cf4d2a0e5bbe76af7ca2584c4d (diff) | |
download | ATCD-aa215fd615491d8cefa53d1cc1dfd6ac1b6d1eed.tar.gz |
Various fixes for memory leaks and null pointer checks.
Diffstat (limited to 'TAO/tests')
-rw-r--r-- | TAO/tests/Dynamic_TP/ORB_ThreadPool/Test_i.cpp | 9 | ||||
-rw-r--r-- | TAO/tests/Dynamic_TP/ORB_ThreadPool/Test_i.h | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/TAO/tests/Dynamic_TP/ORB_ThreadPool/Test_i.cpp b/TAO/tests/Dynamic_TP/ORB_ThreadPool/Test_i.cpp index 00c7345f6e1..7107990c9fc 100644 --- a/TAO/tests/Dynamic_TP/ORB_ThreadPool/Test_i.cpp +++ b/TAO/tests/Dynamic_TP/ORB_ThreadPool/Test_i.cpp @@ -42,7 +42,7 @@ Middle_i::call_delay(CORBA::Short sec) ACE_Thread::self (thr); bool recursive = false; { - ACE_GUARD (ACE_Thread_Mutex, guard, this->lock_); + ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->lock_); int result = this->threads_.insert (thr); ACE_ASSERT (result != -1); if (result == 1) @@ -59,8 +59,13 @@ Middle_i::call_delay(CORBA::Short sec) if (!recursive) { - ACE_GUARD (ACE_Thread_Mutex, guard, this->lock_); + ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->lock_); int result = this->threads_.remove (thr); + if (result == -1) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("(%P|%t) Middle_i::call_delay, ") + ACE_TEXT ("unable to remove thr = %d\n"), + thr)); ACE_ASSERT (result != -1); } diff --git a/TAO/tests/Dynamic_TP/ORB_ThreadPool/Test_i.h b/TAO/tests/Dynamic_TP/ORB_ThreadPool/Test_i.h index 59ec8c154e5..828d5e3069b 100644 --- a/TAO/tests/Dynamic_TP/ORB_ThreadPool/Test_i.h +++ b/TAO/tests/Dynamic_TP/ORB_ThreadPool/Test_i.h @@ -44,7 +44,7 @@ private: CORBA::ORB_var orb_; Test::Sleeper_var sleeper_; - ACE_Thread_Mutex lock_; + TAO_SYNCH_MUTEX lock_; ACE_Unbounded_Set<ACE_hthread_t> threads_; }; |