Mark,

Yes, I'm using:
final RemoteCallbackList<IRemoteServiceCallback> mCallbacks
            = new RemoteCallbackList<IRemoteServiceCallback>();

to register my callback.  But I'm sure that RemoteCallbackList is not
the issue since I completely removed the register and unregister calls
and still have the leak issue.  So somehow one of the idls is leaking?
Thanks for your help!

// ====================================================
                // registerCallback(IRemoteServiceCallback)
                // Info: Register callback
                // ====================================================
                public void registerCallback(IRemoteServiceCallback cb) {
                        if (cb != null) {
                        //      mCallbacks.register(cb);
                        }
                }

                // ====================================================
                // unregisterCallback(IRemoteServiceCallback)
                // Info: Unregister callback
                // ====================================================
                public void unregisterCallback(IRemoteServiceCallback cb) {
                        if (cb != null) {
                        //      mCallbacks.unregister(cb);
                        }
                }

On Mar 7, 9:44 pm, Mark Murphy <[email protected]> wrote:
> Moto wrote:
> > I start the service at onStart() and stop it at onStop()
>
> > // This is how I connect
> > // Start Service
> > this.startService(i);
>
> > // connect to service
> > this.bindService( i, this, Context.BIND_AUTO_CREATE);
>
> You do not need to call both startService() and bindService(). The
> Context.BIND_AUTO_CREATE parameter will cause the service to be started
> if it is not already started.
>
> With respect to your leak, if you are convinced the problem relates to
> the callback registration, you can use logging or breakpoints to confirm
> that your code is actually getting called when you think it is, and that
> the RemoteCallbackList (which is what I'm assuming you're using) is
> cleanly getting emptied when you unregister.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

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

Reply via email to