Script to free memory on my RB

Greetings dear friends, I want to know if there is the possibility of creating a script that automatically releases the memory of my RB?
I do not know if they understood me

What is your Mikrotik memory used for? Mikrotik reboot may be the right solution

Memory usage should not change under normal usage.
I may that you have a problem or a bad routerOS.