This issue is not fixed in version 7, but it is less severe. Version 7 simply introduced a new Map and flag to optionally retain data in the new map. It did not address the memory leak with the "serviceUsers" map. It is less severe now though because the map is keyed by the hashCode instead of the full Service object. I still don't see why this map is required though, it's never read in any of the breakpoints that I see. We're not caching and re-using the Service objects because our applications operate in a multi-threaded environment and I don't think the ServiceAccountantManager accounts for this.
So, I'd still like to see this issue addressed. In the meantime our workaround is call the "clear" method every time we request a service. Thanks, Joel On Feb 19, 10:54 am, joel <joel.patt...@gmail.com> wrote: > Oh man I'm 2 days late. I didn't see that a new version was just > released. I'll try that one out. > Thanks! > > On Feb 19, 10:29 am, Peter Niederwieser <pnied...@gmail.com> wrote: > > > We had the same problem, always had to patch the library. But the > > latest release (7.0) claims to *really* fix this issue. > > > Cheers, > > Peter > > > On Feb 18, 10:11 pm, joel <joel.patt...@gmail.com> wrote: > > > > If you have code structured like the following, > > > ServiceAccountantManager leaks memory due to retaining the Service in > > > its serviceUsers map: > > > > AdWordsUser user = getUser(); > > > AdGroupCriterionServiceInterface criterionSvc = > > > user.getService(AdWordsService.V200909.ADGROUP_CRITERION_SERVICE); > > > criterionSvc.mutate(updates); > > > return; > > > > The only way to prevent this is to explicitly call clear or remove the > > > mapping in ServiceAccountantManager. This should be unnecessary > > > because the serviceUsers map is not required to be populated. The > > > latest client library update added a flag autoCreateAccountant to > > > control creating ServiceAccounts, but we also need a similar flag for > > > tracking User/Service mappings. > > > > Maybe I'm missing something here but we shouldn't have to explicitly > > > cleanup mappings that aren't necessary to be created in the 1st place. > > > Am I right? > > > > Thanks, > > > > Joel -- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-...@googlegroups.com. To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en.