jumaris / marketbilling

Automatically exported from code.google.com/p/marketbilling
0 stars 0 forks source link

Service object leak in BillingService #43

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The inner classes in BillingService: BillingRequest and its subclasses are not 
static, and as such, keep a reference (hidden, generated by the compiler) to 
the containing class instance, which is BillingService.

At the same time, they are entered into a static array, mPendingRequests.

If the service is stopped and restarted, any exising request objects will keep 
their references to the original service instance, and refer to that (dead) 
instance when calling methods of BillingService. At the same time, the original 
service instances will be prevented from being GC'd.

Original issue reported on code.google.com by kmans...@gmail.com on 18 Aug 2011 at 10:13