This is something that will be dependent on the scope you use.  None of the
Scopes bundled with Guice proper include such a feature afaik.

But on that note, I'm about to build it into a custom scope I use, and so I
do think the idea has wheels.

Fred

On Wed, Feb 23, 2011 at 1:48 AM, scott <[email protected]> wrote:

> I was just wondering if there is any way to implement a callback to
> perform some logic when an object goes out of "Scope" ? For example, I
> have a Request scoped @Provides method, that creats an object and does
> some initialization on it, I need a way to do some cleanup when the
> scope is exiting. -thanks
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "google-guice" 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?hl=en.
>
>

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

Reply via email to