fix warns and memory leak
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3-win32-warn

Conflicts:
	tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp
Merge pull request #8543 from Dhilan007/v3-fixwarns

fix warns and memory leak