I think the answer to your question is no: it wouldn't be that helpful
from a memory footprint perspective to simply kill the service: memory
allocation happens at the process level.  For this to be useful, the
service would have to be "killed" out in some heuristic way, then some
GC would have to run for a while, and *then* the memory would be
available.  I doubt this is preferable to simply killing the process,
since in a low memory situation you usually need memory pretty
quickly.

I haven't read all of the Android framework code that does this, so I
can can't give a certain yes or no answer.  You could ask on
android-platform and perhaps someone there would know.

You never mentioned why you need to know this information, maybe doing
so would be helpful.  There are tons of times when things in android
look like they have been "killed."  E.g., screen rotation.

Kris


On Mon, Jan 5, 2015 at 12:15 PM, Oleksii Bieliaiev
<abel.the.fi...@gmail.com> wrote:
> Didn't find reliable answer yet :(
>
>
>
> On Tuesday, November 25, 2014 12:08:18 PM UTC+1, Oleksii Bieliaiev wrote:
>>
>> Hey guys,
>>
>> let's imagine we have an app with a service and an activity inside. Both
>> components live in a same process, our service is started (in terms of
>> Android) and a user does some interaction with an activity. Eventually our
>> app goes to background. My question is, whether is it possible, under
>> certain conditions (low memory, timeout, etc), that Android "kills" our
>> started service separately, without killing entire process?
>>
>> Thank you,
>> Alex
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to