add destroyed hook in resource chooser