Skip to content

Commit

Permalink
gc_collect_cycles
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar authored and slowfox089 committed Dec 10, 2020
1 parent 64c9372 commit bea126e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/models/StorageFilterChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ public function getEffect()
*/
public function applyFilter($loadFromPath, $imageSavePath)
{
gc_collect_cycles();

$imagineEffectName = $this->effect->getImagineEffectName();

if (!$this->effectDefinition($imagineEffectName)) {
Expand Down
2 changes: 2 additions & 0 deletions src/storage/BaseFileSystemStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,8 @@ public function addImage($fileId, $filterId = 0, $throwException = false)
*/
public function createImage($fileId, $filterId)
{
gc_collect_cycles();

$image = StorageImage::find()->where(['file_id' => $fileId, 'filter_id' => $filterId])->one();

// the image exists already in the database and the file system
Expand Down

0 comments on commit bea126e

Please sign in to comment.