solve bugs of memory leaks
- resolve memory leak of config class
- resolve memory leak when no child menu items exist