Periodically free memory from unused images (#3915)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Daniel Sage
2022-09-04 07:23:14 -04:00
committed by GitHub
parent bc38d696bc
commit 8ec032fc84
7 changed files with 246 additions and 35 deletions
@@ -141,9 +141,11 @@ const boost::optional<ImagePtr> &ModerationAction::getImage() const
if (this->imageToLoad_ != 0)
{
if (this->imageToLoad_ == 1)
this->image_ = Image::fromPixmap(getResources().buttons.ban);
this->image_ =
Image::fromResourcePixmap(getResources().buttons.ban);
else if (this->imageToLoad_ == 2)
this->image_ = Image::fromPixmap(getResources().buttons.trashCan);
this->image_ =
Image::fromResourcePixmap(getResources().buttons.trashCan);
}
return this->image_;