If you have a jailbroken iPhone there is a new jailbreak app available called Remove Background from Cydia, but the problem with Remove Background is with the SBSettings Toggle it killed all background apps simultaneously.
However according to an article over on iPhone Download Blog, the new Remove Background app enables the user to specify which background apps they want too kill rather than having to kill all of them.
The difference from the Remove Background SBSetting Toggle app is the user can set the app to work with Activator gestures and select which applications to “exclude” from killing, and Remove Background is completely compatible with Remove Background SBSettings toggle.
What you do is open Remove Background, pick which apps to exclude and then fire up SBSettings and punch the toggle and bingo all apps will be killed with the exception of those you selected and thus frees up iPhone memory. Remove Background is now available to download for free from Cydia.