I use the method Injector.createChildInjector(...) to create many injectors with different configurations in my application. Each of those injectors is only used for a short period of time and then garbage collected.
Now it seems that for each injector an own set of fast classes is created for each SingleMethodInjector and others. For an example look at: https://github.com/google/guice/blob/f905d59ac9c3c1ad57c755a1abb29c4fb2d6b7fa/core/src/com/google/inject/internal/SingleMethodInjector.java#L46 These fast classes (or at least meta data about them) are kept within a global map. The Eclipse Memory Analyzer classifies this as a leak suspect: One instance of "java.util.HashSet" loaded by "<system class loader>" occupies 671,209,552 (79.21%) bytes. The instance is referenced by com.google.inject.internal.cglib.core.$AbstractClassGenerator$1 @ 0xfff4c7a0 , loaded by "com.google.inject". The memory is accumulated in one instance of "java.util.HashMap$Node[]" loaded by "<system class loader>". I think it should be possible for Guice to share the fast classes between different injectors. Any help is appreciated. Thank you and best regards, Ken -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-guice. To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/69c24f66-81fc-4314-8ef9-fae198c761c5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
