Skip to content

Commit

Permalink
Merge pull request #6230 from esnelubov/4.1-free-memory
Browse files Browse the repository at this point in the history
Reduce the memory consumption by forcing PHP to release the unused memory
  • Loading branch information
Naktibalda committed Aug 5, 2021
2 parents 701b636 + ad2d34e commit d69ab79
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Codeception/Lib/Parser.php
Expand Up @@ -170,6 +170,11 @@ public static function getClassesFromFile($file)
}
}

if (PHP_MAJOR_VERSION > 5) {
$tokens = null;
gc_mem_caches();
}

return $classes;
}

Expand Down

0 comments on commit d69ab79

Please sign in to comment.