Experiment: Remove NO_DELETE state of textures used in preview or texture control to get them removed from memory again

meow-7.2.2
Ansariel 2016-06-17 16:04:23 +02:00
parent eac02648a0
commit 12bd27aa2e
2 changed files with 10 additions and 0 deletions

View File

@ -140,6 +140,9 @@ LLPreviewTexture::~LLPreviewTexture()
if (mImage.notNull())
{
mImage->setBoostLevel(mImageOldBoostLevel);
// <FS:Ansariel> Remove NO_DELETE texture state so image gets removed from memory (set by calling setBoostLevel(LLGLTexture::BOOST_PREVIEW))
mImage->forceActive();
// </FS:Ansariel>
mImage = NULL;
}
}

View File

@ -1166,6 +1166,13 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
LLTextureCtrl::~LLTextureCtrl()
{
closeDependentFloater();
// <FS:Ansariel> Remove NO_DELETE texture state so image gets removed from memory (set by calling setBoostLevel(LLGLTexture::BOOST_PREVIEW))
if (mTexturep.notNull())
{
mTexturep->forceActive();
}
// </FS:Ansariel>
}
void LLTextureCtrl::setShowLoadingPlaceholder(BOOL showLoadingPlaceholder)