Added MediaTrait::freeMedia() method to free media (and memory)

This commit is contained in:
Matias Griese
2020-03-06 13:41:03 +02:00
parent d80a29b34d
commit f5a480c72e
2 changed files with 12 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
# v1.7.0-rc.8
## mm/dd/2020
1. [](#bugfix)
* Added `MediaTrait::freeMedia()` method to free media (and memory)
# v1.7.0-rc.7
## 03/05/2020

View File

@@ -108,6 +108,11 @@ trait MediaTrait
return $this;
}
protected function freeMedia()
{
$this->media = null;
}
/**
* Clear media cache.
*/
@@ -117,7 +122,7 @@ trait MediaTrait
$cacheKey = md5('media' . $this->getCacheKey());
$cache->delete($cacheKey);
$this->media = null;
$this->freeMedia();
}
/**