diff options
author | Richard Linden <none@none> | 2013-01-08 00:25:07 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2013-01-08 00:25:07 -0800 |
commit | 3c341a11ab7b8f3fd18afcf3f50af6dfafa632c2 (patch) | |
tree | c937cdcd5368a2b4665d06a1af047eebddd31737 /indra/llcommon/llmutex.cpp | |
parent | 68413515029f50713c70e4adec3ce6fd1022d59f (diff) |
SH-3468 WIP add memory tracking base class
more fixes for unit test crashes
added llcommon initialization/teardown for unit tests
that indirectly trigger lltrace
changed access of atomic refcount to use preincrement/decrement
operators to reflect desired semantics
always call apr_initialize in LLCommon::initClass, even
if already initialized...apr does internal reference counting
to keep things straight
Diffstat (limited to 'indra/llcommon/llmutex.cpp')
-rw-r--r-- | indra/llcommon/llmutex.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llcommon/llmutex.cpp b/indra/llcommon/llmutex.cpp index b685bb4d60..ad0287c6d5 100644 --- a/indra/llcommon/llmutex.cpp +++ b/indra/llcommon/llmutex.cpp @@ -56,12 +56,15 @@ LLMutex::~LLMutex() //bad assertion, the subclass LLSignal might be "locked", and that's OK //llassert_always(!isLocked()); // better not be locked! #endif - apr_thread_mutex_destroy(mAPRMutexp); - mAPRMutexp = NULL; - if (mIsLocalPool) + if (ll_apr_is_initialized()) { - apr_pool_destroy(mAPRPoolp); + apr_thread_mutex_destroy(mAPRMutexp); + if (mIsLocalPool) + { + apr_pool_destroy(mAPRPoolp); + } } + mAPRMutexp = NULL; } |