summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-01-06 21:37:31 -0800
committerRichard Linden <none@none>2013-01-06 21:37:31 -0800
commit68413515029f50713c70e4adec3ce6fd1022d59f (patch)
tree2f78acd9745ea4a10397ba360fb73e32c006509d /indra/llcommon
parent222941d83c9a8e9fc1a488f0092f233b71a63db3 (diff)
SH-3468 WIP add memory tracking base class
fix for unit test failures...cleanup apr without destroying pools, allowing LLProxy to clean itself up as a singleton (and avoiding spurious dependencies associated with manually destorying singletons that rely on apr pools)
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llapr.cpp4
-rw-r--r--indra/llcommon/llapr.h2
-rw-r--r--indra/llcommon/lltracethreadrecorder.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp
index d911f258b6..8a87911315 100644
--- a/indra/llcommon/llapr.cpp
+++ b/indra/llcommon/llapr.cpp
@@ -60,7 +60,7 @@ void ll_init_apr()
}
-void ll_cleanup_apr()
+void ll_cleanup_apr(bool destroy_pools)
{
LL_INFOS("APR") << "Cleaning up APR" << LL_ENDL;
@@ -83,7 +83,7 @@ void ll_cleanup_apr()
LLThreadLocalPointerBase::destroyAllThreadLocalStorage();
- if (gAPRPoolp)
+ if (gAPRPoolp && destroy_pools)
{
apr_pool_destroy(gAPRPoolp);
gAPRPoolp = NULL;
diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h
index b3c9bfd58c..424ddc6505 100644
--- a/indra/llcommon/llapr.h
+++ b/indra/llcommon/llapr.h
@@ -70,7 +70,7 @@ void LL_COMMON_API ll_init_apr();
/**
* @brief Cleanup those common apr constructs.
*/
-void LL_COMMON_API ll_cleanup_apr();
+void LL_COMMON_API ll_cleanup_apr(bool destroy_pools = true);
//
//LL apr_pool
diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp
index 9fb789c62d..7b493a651e 100644
--- a/indra/llcommon/lltracethreadrecorder.cpp
+++ b/indra/llcommon/lltracethreadrecorder.cpp
@@ -127,7 +127,7 @@ std::list<ThreadRecorder::ActiveRecording>::iterator ThreadRecorder::update( Rec
if (it == end_it)
{
- llerrs << "Recording not active on this thread" << llendl;
+ llwarns << "Recording not active on this thread" << llendl;
}
return it;