On Tuesday 27 October 2009 10:20:50 waz wrote:
> Hi,
>
>
>
> I have a question about the lifecycle of Service Providers looked up by
> Lookup. If an instance does not exist, a new one is created. But if an
> instance is looked up and discarded, will a future lookup return the same
> instance? I would like to know if I need to keep references to the Service
> Providers to avoid them being garbage collected, since they contain some
> state information.
Look at openide.util/test/** to see if you use case is covered. As far as I
know the instances are hold by WeakReference. Thus they can be GC if nobody
else except meta-inf services lookup uses them.
-jst