Status: New
Owner: [email protected]

New issue 723 by [email protected]: Minor optimization to TypeConverterBindingProcessor
http://code.google.com/p/google-guice/issues/detail?id=723

TypeConverterBindingProcessor has two responsibilities: 1) prepare built-in type converters for primitives, enums, classes, etc. and 2) process TypeConverter bindings and register them with the containing injector.

The first responsibility only needs the injector reference, it doesn't need access to the processor's Errors cache. However, the current implementation runs in the context of the processor and creates a number of anonymous classes, and they all contain an implicit reference (this$0) back to the processor. This can lead to some Errors instances being kept alive longer than necessary by these anonymous classes, but not a large number.

Changing the prepareBuiltInConverters implementation over to use static methods that pass the injector as an argument fixes this problem by removing the implicit reference to the processor, since the anonymous classes are now created from a static context.

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" 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/google-guice-dev?hl=en.

Reply via email to