Answer the question
In order to leave comments, you need to log in
How to clear RAM while the script is running?
There is a script that goes through a huge number of files and folders, makes queries to the database, changes texts, creates subfolders and eats more than 6 GB of RAM in a couple of hours of work. Search in Google gives options only for the case when the script has worked, but the memory has not been freed. I would like to know the options for freeing memory right in the process of running the script?
Answer the question
In order to leave comments, you need to log in
Use unset() for data that is no longer needed.
Link: https://habr.com/en/post/134784/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question