Re: [android-developers] Messenger from Remote Service Causing Memory Leak

2012-08-30 Thread Dave Smith
Dianne - Thanks so much for the insight! That seems very much to be the case because if I force a GC through DDMS on the remote process, all those objects in the application process finally get released. Something else I would recommend is to not do a design where you > instantiate Messenger

Re: [android-developers] Messenger from Remote Service Causing Memory Leak

2012-08-30 Thread Dianne Hackborn
It is true that sending a messenger across processes will require holding a GREF on it for the other process to communicate with it. Barring bugs (which have happened but I am not sure if in any released platform versions), the GREF will be released when the other process itself no longer holds a r

Re: [android-developers] Messenger from Remote Service Causing Memory Leak

2012-08-30 Thread Mark Murphy
On Thu, Aug 30, 2012 at 5:42 PM, Dave Smith wrote: > Does anyone know if there is a way to clear or disable the Messenger when > the "Operation" is over so it doesn't create this memory leak? Whatever you do, don't shoot it. :-) More seriously, I haven't a clue -- I haven't used Messenger much

[android-developers] Messenger from Remote Service Causing Memory Leak

2012-08-30 Thread Dave Smith
I have an application that communicates with a Service in a remote process using the Messengerinterface. Here is the basic architecture of how things are set up: - The application generates several "Operation" objects that require access to the service. - Each "Operation" contains a