diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-09-12 06:27:13 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-09-12 06:27:13 +0000 |
commit | da94c0eaa2ce2711f0ae26968e87ef3e409126a9 (patch) | |
tree | e0b23896f17e0a0ea60160b2c7e39331f3cb9668 /indra/newview/lltexturecache.cpp | |
parent | 642cdd95726755b7c24c7f2b25e2fea8e49b5b9b (diff) |
QAR-855 Viewer 1.21 RC 2
merge viewer_1-21 94770-96059 -> release
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
-rw-r--r-- | indra/newview/lltexturecache.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index deb817d2ab..3d53eaa631 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -792,6 +792,14 @@ bool LLTextureCacheRemoteWorker::doWrite() //virtual bool LLTextureCacheWorker::doWork(S32 param) { + //allocate a new local apr_pool + LLAPRPool pool ; + + //save the current mFileAPRPool to avoid breaking anything. + apr_pool_t* old_pool = mCache->getFileAPRPool() ; + //make mFileAPRPool to point to the local one + mCache->setFileAPRPool(pool.getAPRPool()) ; + bool res = false; if (param == 0) // read { @@ -805,6 +813,10 @@ bool LLTextureCacheWorker::doWork(S32 param) { llassert_always(0); } + + //set mFileAPRPool back, the local one will be released automatically. + mCache->setFileAPRPool(old_pool) ; + return res; } |