When is the instance created from goggle juice garbage collected

44 views
Skip to first unread message

joshita mishra

unread,
Dec 9, 2020, 12:49:55 AM12/9/20
to google-guice
Hi,

I am using google guice framework in my application. 
injector = Guice.createInjector(xxxxx);
This is how we have the instance of injector created on startup.
inst = injector.getInstance(xxxxx.class);
This is how we get the instance of class needed.
I have following questions:
1. Will the instance be garbage collected once this method call completes.
2. When does garbage collection happens for objects created by guice framework, we use two types of bindings - singleton and default

Also it would be helpful if you can share a document explaining the lifecycle of both singleton and default objects created from google guice.

Reply all
Reply to author
Forward
0 new messages