For those saying that "unless a program is updated specifically for multitasking, it's not running in memory", how does one explain the fact that the amount of free RAM available to the OS is influenced by the number of programs shown in the background apps menu? I can verify this all day long on both my 3GS and iPhone 4. When the RAM drops below 20Mb free on my 3GS, Safari will typically crash back down to the Home screen, as well as any RAM intensive games upon the first attempt at running them. It's like the OS hasn't cleaned up memory until it gets the call for memory for these RAM intensive programs (the first time I try to open them), THEN cleans up the RAM so that when I try to open them a second time, it typically does so ok. But, if I open the multitasking view and manually "close" all those programs (even ones that have no updated multitasking capability, like "clock", "facebook", "engadget", etc), the amount of free RAM increases AS I DO THIS (you can observe it with an app like "FreeMemory"), and I have no trouble starting RAM intensive apps like games or Safari.
I've even witnessed this to some extent on the iPhone 4. It's not dropping low enough (in free RAM) to cause apps to crash down to the Home screen, but it will drop all the way down to less than 60Mb of free RAM, at which point I can go into the multitasking view and manually close all programs (again, even ones that aren't using any multitasking APIs), and bring that free RAM right back up to 240+Mb. What explains the correlation between how many programs are listed in the "multitasking/recently used" view with how much free RAM the device has? And if the OS is handling the freeing of this RAM "effectively", the why hasn't it freed the RAM (in my 3GS example above) BEFORE the RAM intensive apps need it, which causes them to crash until the RAM is opened back up?
And right there is your problem. I'm going to guess that you have a long Windows background. Because Windows is the only operating system that trains users to believe "Free" memory is a good and desirable commodity.
It is not!
Remember this and repeat it until it becomes religion.
Free memory is wasted memory.
Let me describe to you how a properly working memory management system works: (BTW this is how it works in OSX, iOS, Linux, Solaris, z/OS, Android, ChromeOS and every other operating system created with a decent memory manager.)
Assume device has 256MB.
1) Application is run, consumes 56MB, 200MB "Free"
2) Good OS realizes it has 256MB that is has to keep powered doing absolutely nothing useful, so it prefetches some data that you might need next. It fills up 200MB. Free memory -- 0 or close to it.
3) You launch a different App that needs 100MB. OS didn't guess correctly what you'd need next. So it loads app. (Note there is no performance penalty because there is no need "unload" cached items.) Now we have 56MB App1, 100MB App2, 100MB cache. Free = 0.
4) You close App1. OS could free memory here, but that would be STUPID. You might load the app again in a minute. There is no benefit to "Freeing" the memory until it's needed by something else. ** THIS IS THE ANSWER TO YOUR QUESTION.
5) You launch App3 that needs 50MB. Operating system has choice. It could "Free" the memory previously used by App1 or it could "Free" memory still being used by cache (there is 100MB at this stage). OS decides to use memory from cache. Now we have 56MB App1, 100MB App2, 50MB App3, 50MB cache.
6) You launch App1 again. Because the OS strived to not have "Free" memory it "launches" instantly since it was still in memory. ** THIS IS WHY FREEING THE MEMORY IN STEP 4 IS STUPID
7) You close App1 a second time. Once again it remain in memory. It is not freed.
7) You launch App4. It needs 100 MB. OS realizes 50MB used by cache and 50MB for closed App1 is available. So it only now spends the resources to "Free" App1 memory and combines with freed memory from cache to get 100MB. App4 runs.
Note during all this time the "Free" memory was 0. This is very simplified, but it is the gist of how VMM works. (Most 3rd or 4th year undergraduate CS students have to write an Operating System Virtual Memory manager as a project to do this exact process -- at least at top CS departments. This is really, really basic stuff that Windows gets WRONG.) In addition to this simple stuff you have all sorts of device drivers responding to various interrupts which are constantly requesting and releasing memory as well.
Windows has trained a lot of people in exactly how not to do computer software. (This is an artifact of it's DOS roots -- STILL!) As a practicing computer engineer I find this very frustrating because it results in innocent users wasting their time doing things that at best cause a placebo effect and at worst lead them to desire the ability to control things that will actually make their life more complicated and less productive.