iFlushMemory is the best automatic tool to free up your memory. It monitors your memory usage and detects when to free up your memory based on user activity.
To change the preferences, click iFlushMemory icon in the MenuStatus Bar, and select Preferences..