in reply to wait till memory is flushed

If the function is ended and i check my memory, it's still 30% memory. When i run another function, also requiring alot of memory, i want this memory to be removed first.

The thing is, requesting memory from the system is a costly operation. Far more costly than re-using memory you all ready have. So, if after the first function runs you have sufficient memory free for use within the process for the second function to run, it will run more quickly than if you freed that free memory back to the OS and then have to go cap in hand and ask for it back.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy