Refactoring
Prevent memory leak for Menu.