But what about battery consumption? Is that exactly the same as CPU activity, or is my battery going to be flattened more quickly if I leave it running in background?
Incidentally, this question occurs so frequently, I think this thread should be sticky.
If it uses 0 CPU cycles, it isn't running. Multitasking on the iPhone/iTouch/iPad works a bit like this:
When your app is put into the background, the device shuts off all messages to your app, and pauses it. Nothing runs. But because the app is multitasking aware, it will remain in RAM so that it can be unpaused when it is brought back to the front and save time. This saves a little battery, since you aren't spending time reloading the app into RAM, loading the user's state and data, and so on.
There are 4 exceptions to this rule. Task completion, background GPS, background audio, and background voip calls. The app has to enable this while it is running. In that case, the device will still pause the app, but still send it appropriate messages. These are messages like "user hit play/pause, next/prev", "feed me some audio to play", "here's the new GPS location", "here's some audio from the mic to send", and so on.
Task completion allows an app to complete a task that takes less than X minutes (I think the max an app can request is 10 minutes). This is like NewsRack finishing up marking articles as read as you leave the app, for example. Once the time requested is up or the task complete, the app is paused.
In the case of background audio and voip, only one background app is "unpaused" at a time. And only when there is activity (active call, music is actively playing). Pausing Pandora for example, causes it to stop running. Hanging up a Skype call does the same. An Internet Radio app and Pandora can't both be active at the same time.
For GPS, it is a little trickier, but not by much. The only real difference is that multiple apps can listen to the GPS information and act on it. And the app has to actively be doing something with the GPS information to be unpaused. In TomTom's case, that means having an active route (shown by the location services icon in the status bar when not in the TomTom app). If that icon isn't there when on the home screen for example, TomTom's code isn't running, because the device isn't giving TomTom a chance to do anything. It's simply not giving it any messages telling it your new GPS location.
RAM needs to be powered at all times, so RAM use by an app doesn't really affect battery life. It has to actively be doing something. Apple, by making sure apps that don't have something to do are paused and cannot run code, is protecting the battery life of the device.
That isn't to say that this is ideal. Accidentally leaving TomTom in a route can drain your battery (GPS draws a fair amount of power). Telling Trapster to run in the background can do the same if you forget it is running in the background. TuneIn Radio's recording abilities tend to mess with it's behavior in the background. But on the flip side, these particular issues would still be problems in an unrestricted multitasking environment like WM6 or Android. The key difference is that iPhone devs are sort of forced into the right behavior for battery life.