fix memory leak when add listener to ui object
Merge pull request #8881 from super626/v3

Fix Bugs
Merge pull request #8857 from zhongfq/patch-2

fix memory leak when add listener to ui object