delete topics on window close