diff options
Diffstat (limited to 'indra/newview/llvocache.cpp')
-rw-r--r-- | indra/newview/llvocache.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index b888a263d0..bbb19a63f1 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -76,6 +76,7 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) S32 size = -1; BOOL success; + mDP.assignBuffer(mBuffer, 0); success = check_read(apr_file, &mLocalID, sizeof(U32)); if(success) { @@ -136,10 +137,11 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) LLVOCacheEntry::~LLVOCacheEntry() { - if(mBuffer) + if(mBuffer != mDP.getBuffer()) { - delete[] mBuffer; + delete[] mBuffer ; //just in case } + mDP.freeBuffer(); } @@ -285,8 +287,6 @@ LLVOCache::~LLVOCache() void LLVOCache::setDirNames(ELLPath location) { - std::string delem = gDirUtilp->getDirDelimiter(); - mHeaderFileName = gDirUtilp->getExpandedFilename(location, object_cache_dirname, header_filename); mObjectCacheDirName = gDirUtilp->getExpandedFilename(location, object_cache_dirname); } @@ -339,8 +339,7 @@ void LLVOCache::removeCache(ELLPath location) llinfos << "about to remove the object cache due to settings." << llendl ; - std::string delem = gDirUtilp->getDirDelimiter(); - std::string mask = delem + "*"; + std::string mask = "*"; std::string cache_dir = gDirUtilp->getExpandedFilename(location, object_cache_dirname); llinfos << "Removing cache at " << cache_dir << llendl; gDirUtilp->deleteFilesInDir(cache_dir, mask); //delete all files @@ -361,8 +360,7 @@ void LLVOCache::removeCache() llinfos << "about to remove the object cache due to some error." << llendl ; - std::string delem = gDirUtilp->getDirDelimiter(); - std::string mask = delem + "*"; + std::string mask = "*"; llinfos << "Removing cache at " << mObjectCacheDirName << llendl; gDirUtilp->deleteFilesInDir(mObjectCacheDirName, mask); |