Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sisu-dev] when is Disposable.dipose() supposed to be called?

On 30 Nov 2011, at 09:06, "Sievers, Jan" <jan.sievers@xxxxxxx> wrote:

> Hi,
> 
> in tycho we have a plexus component which implements Disposable, see [1].
> 
> I want some cleanup work to be done in dispose() but it seems this method is never called.

Hi Jan,

Disposables are only called when the Plexus container is itself disposed or when someone explicitly calls the container to release the component (or the map/list containing the component).

If it is not getting called then that suggests no-one is disposing of the container. (Sisu-)Plexus will only act on container.dispose() - it doesn't install any shutdown hooks itself or use any form of GC/finalization to track when a component is no longer alive.

--
Cheers, Stuart

> Any hints what I could be doing wrong?
> 
> Regards,
> Jan
> 
> [1] http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/sisu-equinox/sisu-equinox-embedder/src/main/java/org/eclipse/sisu/equinox/embedder/internal/DefaultEquinoxEmbedder.java 
> _______________________________________________
> sisu-dev mailing list
> sisu-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/sisu-dev


Back to the top