[sencha+phonegap] when does the OS decides to 'shutdown' an app

Hi all
I have a sencha phonegap app - pure sencha JS code - no use of native functionality. deployed on ios.
I was wondering regarding the following behavior:
1. launch the app and do some stuff
2. press home screen button - app is invisible but still on the multitasking menu
3. after an hour or so open the app from the multi tasking window and app returns to where I left it as expected
4. press home screen button - app is invisible but still on the multitasking menu
5. after 24 hours or so open the app from the multi tasking window and the app is re-launched from scratch (splash screen etc)
I was wondering why is that? I though that as long that the app 'lives' in the multitasking window it is always 'awake' and will return to previous state.
can anyone please shed some light over this?
thanks in advance.