Details
-
Improvement
-
Resolution: Fixed
-
Major
-
3.3-milestone-1
-
None
Description
Provide a new Disposable interface, with a single method dispose(), that could be implemented by a component and that is called when a (singleton) component is released from the available instances. This could only happen in two situation:
- a component descriptor with the same role and rolehint as the component is registered and replace the existing one
- the role and rolehint of the component is unregistered
This allow the released component to properly clean up its ressources usage. There is obviously no assurance that other components do not hold a reference on the destroyed one. It is advised that any component which depends on a component exposing the Disposable interface to not hold a reference on it longer than needed, and that any component that maybe disposed to implement this interface, at least as a marker interface.
This improvement is needed to be able to reload "on the fly" wiki components, "java" wiki macros.