On Fri, Dec 12, 2008 at 3:56 AM, zero <[email protected]> wrote:
> o_0'' for real ?!? > that would mean i'm depending on luck and good faith then > calling anything on that connection. oh, well. in the garbage > collector we trust ;-) The IBinder communication channel between the application and the service is direct, so once you have it you can continue to call it until the service's process goes away or the service deliberately decides otherwise. > but something is still bugging me: further observations seemed like > that it's depending on whether i call service.unregisterCallback > (myCallback) > before unbind(,,) or not. > if i don't, the error goes away, but the callback gets leaked. > would it be a better strategy to make the service throw away the > callbacks > by itself then it gets unbound ? The service only knows when -all- clients have unbound. You can certainly remove all callbacks at that point, but I that won't really cover all cases. If you look at the ApiDemos example, though, it does deal with things like the client process going away and clean up all callbacks at that point. -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

