Lifecycle support for destroying a plugin