Q:

How to ensure resources are released using Google Dagger 2

Google Dagger 2 is all about object scopes e.g. when you need objects just during an http request you annotate your provider methods with @RequestScope.
But some provided resources need to be released for example a CloseableHttpClient needs to be closed or an ExecutorService needs to be shutdown.
How can I specify which actions have to be taken in order to release an object when it goes out of scope using Google Dagger 2?

A:

How can I specify which actions have to be taken in order to release an object when it goes out of scope using Google Dagger 2?

You can't. Dagger 2 is about providing dependencies to create your objects, not about managing them.
If you have objects that need to be stopped or shut down you will still have to use your components life cycle methods—like activities onDestroy—to do so.

