use `new` and `CC_SAFE_DELETE_ARRAY` to replace `malloc` and `free`
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into dev_compile_error
Modify some functions return value from `bool` to `int`
Merge pull request #6513 from samuele3hu/dev_compile_error

[Lua] The array stores Vector2 element should use `new[]` and `CC_SAFE_DELETE_ARRAY` to alloc/ free memory