fix memory leak when use menu_selector.