Is it possible to clear the memory of my mac after doing a very dificult script?
Memory is RAM. RAM stands for Random Access Memory, which is a volatile form of storage. It will be overwrote on it own, or reset when the system does. =)
It’s almost impossible for a very closed scripting language like Applescript to have memory leaks, and clearing all of your memory basically is saying that you quit every application known to man, even Spotlight. So #1, you don’t need to, and 2#, it just ruins your computer and you’ll have to force restart it.