Periodically free memory from unused images (#3915)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user