It doesn't remain alive until the system shuts down, it is until your
process is killed to reclaim memory for others.  At this point the binding
will be removed.

On Thu, Mar 10, 2011 at 6:56 PM, Mark Carter <mjc1...@googlemail.com> wrote:

> ContentProviders are instantiated at system startup and remain "alive"
> until the system shuts down.
>
> I have a ContentProvider that binds to one of my (local) services (which is
> most likely not already running) and so would like to unbind at some
> appropriate time. If unbindService is not called then the Service will
> remain running until the system shuts down. I assume this is bad.
>
> When the service stops, appropriate db connections are closed.
>
> The question is, when to call unbindService()?
>
> My initial thoughts are to wrap any returned Cursors to monitor when all
> returned Cursors have been closed.
>
> --
> 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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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

Reply via email to