Re: [android-developers] AIDL callbacks leak memory?

2012-06-15 Thread G. Blake Meike
Got it. Thanks Dianne. G. Blake Meike Marakana The second edition of Programming Android is now on-line: http://shop.oreilly.com/product/0636920023005.do -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email t

Re: [android-developers] AIDL callbacks leak memory?

2012-06-14 Thread Dianne Hackborn
The underlying binder mechanisms keeps track of references across objects. Native IBinder objects are reference counted; the framework holds a reference on them as long as remote processes hold references. The JNI wrapper holds a reference on the Java object as long as the native binder object is

[android-developers] AIDL callbacks leak memory?

2012-06-14 Thread G. Blake Meike
I've been digging into Android IPC, recently and there's something puzzling me. Suppose I define a Parcelable that, as one of its arguments, takes a callback listener which is also Parcelable. Like this: oneway interface MyService { void start(in MyRequest req, in MyResponseListener listen