destroy component after detach