[Ide] Fixed a leak caused by non destroyed context menus.