B
B
BoriHagen2021-07-09 10:38:24
PHP
BoriHagen, 2021-07-09 10:38:24

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

1 answer(s)
R
Ronald McDonald, 2021-07-09
@BoriHagen

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 question

Ask a Question

731 491 924 answers to any question