diff --git a/samples/Cpp/AssetsManagerTest/proj.win32/main.cpp b/samples/Cpp/AssetsManagerTest/proj.win32/main.cpp index f15aa09b20..e9fef1d86d 100644 --- a/samples/Cpp/AssetsManagerTest/proj.win32/main.cpp +++ b/samples/Cpp/AssetsManagerTest/proj.win32/main.cpp @@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); int ret = Application::getInstance()->run(); diff --git a/samples/Cpp/HelloCpp/proj.linux/main.cpp b/samples/Cpp/HelloCpp/proj.linux/main.cpp index 2c1830bfaf..135ddbb2f1 100644 --- a/samples/Cpp/HelloCpp/proj.linux/main.cpp +++ b/samples/Cpp/HelloCpp/proj.linux/main.cpp @@ -12,7 +12,7 @@ int main(int argc, char **argv) { // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Cpp/HelloCpp/proj.mac/main.cpp b/samples/Cpp/HelloCpp/proj.mac/main.cpp index a8560f50cd..976460501e 100644 --- a/samples/Cpp/HelloCpp/proj.mac/main.cpp +++ b/samples/Cpp/HelloCpp/proj.mac/main.cpp @@ -30,8 +30,8 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Cpp/HelloCpp/proj.win32/main.cpp b/samples/Cpp/HelloCpp/proj.win32/main.cpp index 0bf8bf10ee..ec96f44bca 100644 --- a/samples/Cpp/HelloCpp/proj.win32/main.cpp +++ b/samples/Cpp/HelloCpp/proj.win32/main.cpp @@ -14,7 +14,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Cpp/SimpleGame/proj.linux/main.cpp b/samples/Cpp/SimpleGame/proj.linux/main.cpp index 651d619dc1..4e9455bc04 100644 --- a/samples/Cpp/SimpleGame/proj.linux/main.cpp +++ b/samples/Cpp/SimpleGame/proj.linux/main.cpp @@ -12,7 +12,7 @@ int main(int argc, char **argv) { // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Cpp/SimpleGame/proj.mac/main.cpp b/samples/Cpp/SimpleGame/proj.mac/main.cpp index a8560f50cd..976460501e 100644 --- a/samples/Cpp/SimpleGame/proj.mac/main.cpp +++ b/samples/Cpp/SimpleGame/proj.mac/main.cpp @@ -30,8 +30,8 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Cpp/TestCpp/proj.linux/main.cpp b/samples/Cpp/TestCpp/proj.linux/main.cpp index a2e9b8c38d..fe28f03278 100644 --- a/samples/Cpp/TestCpp/proj.linux/main.cpp +++ b/samples/Cpp/TestCpp/proj.linux/main.cpp @@ -13,7 +13,7 @@ int main(int argc, char **argv) { // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Cpp/TestCpp/proj.mac/main.cpp b/samples/Cpp/TestCpp/proj.mac/main.cpp index d8074883bc..061f7b6874 100644 --- a/samples/Cpp/TestCpp/proj.mac/main.cpp +++ b/samples/Cpp/TestCpp/proj.mac/main.cpp @@ -30,7 +30,7 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Cpp/TestCpp/proj.win32/main.cpp b/samples/Cpp/TestCpp/proj.win32/main.cpp index 26ba4e9292..8411246122 100644 --- a/samples/Cpp/TestCpp/proj.win32/main.cpp +++ b/samples/Cpp/TestCpp/proj.win32/main.cpp @@ -14,7 +14,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",960,640); + EGLView eglView; + eglView.init("TestCPP",960,640); return Application::getInstance()->run(); } diff --git a/samples/Javascript/CocosDragonJS/proj.mac/main.cpp b/samples/Javascript/CocosDragonJS/proj.mac/main.cpp index d8074883bc..061f7b6874 100644 --- a/samples/Javascript/CocosDragonJS/proj.mac/main.cpp +++ b/samples/Javascript/CocosDragonJS/proj.mac/main.cpp @@ -30,7 +30,7 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Javascript/CocosDragonJS/proj.win32/main.cpp b/samples/Javascript/CocosDragonJS/proj.win32/main.cpp index f15aa09b20..e9fef1d86d 100644 --- a/samples/Javascript/CocosDragonJS/proj.win32/main.cpp +++ b/samples/Javascript/CocosDragonJS/proj.win32/main.cpp @@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); int ret = Application::getInstance()->run(); diff --git a/samples/Javascript/CrystalCraze/proj.mac/main.cpp b/samples/Javascript/CrystalCraze/proj.mac/main.cpp index d8074883bc..061f7b6874 100644 --- a/samples/Javascript/CrystalCraze/proj.mac/main.cpp +++ b/samples/Javascript/CrystalCraze/proj.mac/main.cpp @@ -30,7 +30,7 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Javascript/CrystalCraze/proj.win32/main.cpp b/samples/Javascript/CrystalCraze/proj.win32/main.cpp index f15aa09b20..e9fef1d86d 100644 --- a/samples/Javascript/CrystalCraze/proj.win32/main.cpp +++ b/samples/Javascript/CrystalCraze/proj.win32/main.cpp @@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); int ret = Application::getInstance()->run(); diff --git a/samples/Javascript/MoonWarriors/proj.mac/main.cpp b/samples/Javascript/MoonWarriors/proj.mac/main.cpp index a8560f50cd..976460501e 100644 --- a/samples/Javascript/MoonWarriors/proj.mac/main.cpp +++ b/samples/Javascript/MoonWarriors/proj.mac/main.cpp @@ -30,8 +30,8 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Javascript/MoonWarriors/proj.win32/main.cpp b/samples/Javascript/MoonWarriors/proj.win32/main.cpp index f15aa09b20..e9fef1d86d 100644 --- a/samples/Javascript/MoonWarriors/proj.win32/main.cpp +++ b/samples/Javascript/MoonWarriors/proj.win32/main.cpp @@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); int ret = Application::getInstance()->run(); diff --git a/samples/Javascript/TestJavascript/proj.mac/main.cpp b/samples/Javascript/TestJavascript/proj.mac/main.cpp index a8560f50cd..976460501e 100644 --- a/samples/Javascript/TestJavascript/proj.mac/main.cpp +++ b/samples/Javascript/TestJavascript/proj.mac/main.cpp @@ -30,8 +30,8 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Javascript/TestJavascript/proj.win32/main.cpp b/samples/Javascript/TestJavascript/proj.win32/main.cpp index f15aa09b20..e9fef1d86d 100644 --- a/samples/Javascript/TestJavascript/proj.win32/main.cpp +++ b/samples/Javascript/TestJavascript/proj.win32/main.cpp @@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); int ret = Application::getInstance()->run(); diff --git a/samples/Javascript/WatermelonWithMe/proj.mac/main.cpp b/samples/Javascript/WatermelonWithMe/proj.mac/main.cpp index a8560f50cd..976460501e 100644 --- a/samples/Javascript/WatermelonWithMe/proj.mac/main.cpp +++ b/samples/Javascript/WatermelonWithMe/proj.mac/main.cpp @@ -30,8 +30,8 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Javascript/WatermelonWithMe/proj.win32/main.cpp b/samples/Javascript/WatermelonWithMe/proj.win32/main.cpp index f15aa09b20..e9fef1d86d 100644 --- a/samples/Javascript/WatermelonWithMe/proj.win32/main.cpp +++ b/samples/Javascript/WatermelonWithMe/proj.win32/main.cpp @@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); int ret = Application::getInstance()->run(); diff --git a/samples/Lua/HelloLua/proj.linux/main.cpp b/samples/Lua/HelloLua/proj.linux/main.cpp index 2c1830bfaf..135ddbb2f1 100644 --- a/samples/Lua/HelloLua/proj.linux/main.cpp +++ b/samples/Lua/HelloLua/proj.linux/main.cpp @@ -12,7 +12,7 @@ int main(int argc, char **argv) { // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Lua/HelloLua/proj.mac/main.cpp b/samples/Lua/HelloLua/proj.mac/main.cpp index d8074883bc..061f7b6874 100644 --- a/samples/Lua/HelloLua/proj.mac/main.cpp +++ b/samples/Lua/HelloLua/proj.mac/main.cpp @@ -30,7 +30,7 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Lua/HelloLua/proj.win32/main.cpp b/samples/Lua/HelloLua/proj.win32/main.cpp index 46349a8c5a..3706b8cfdb 100644 --- a/samples/Lua/HelloLua/proj.win32/main.cpp +++ b/samples/Lua/HelloLua/proj.win32/main.cpp @@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); int ret = Application::getInstance()->run(); diff --git a/samples/Lua/TestLua/proj.linux/main.cpp b/samples/Lua/TestLua/proj.linux/main.cpp index a2e9b8c38d..fe28f03278 100644 --- a/samples/Lua/TestLua/proj.linux/main.cpp +++ b/samples/Lua/TestLua/proj.linux/main.cpp @@ -13,7 +13,7 @@ int main(int argc, char **argv) { // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Lua/TestLua/proj.mac/main.cpp b/samples/Lua/TestLua/proj.mac/main.cpp index d8074883bc..061f7b6874 100644 --- a/samples/Lua/TestLua/proj.mac/main.cpp +++ b/samples/Lua/TestLua/proj.mac/main.cpp @@ -30,7 +30,7 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/samples/Lua/TestLua/proj.win32/main.cpp b/samples/Lua/TestLua/proj.win32/main.cpp index 8f302d1f1a..4dfce357f9 100644 --- a/samples/Lua/TestLua/proj.win32/main.cpp +++ b/samples/Lua/TestLua/proj.win32/main.cpp @@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); int ret = Application::getInstance()->run(); diff --git a/template/multi-platform-cpp/proj.linux/main.cpp b/template/multi-platform-cpp/proj.linux/main.cpp index a2e9b8c38d..fe28f03278 100644 --- a/template/multi-platform-cpp/proj.linux/main.cpp +++ b/template/multi-platform-cpp/proj.linux/main.cpp @@ -13,7 +13,7 @@ int main(int argc, char **argv) { // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/template/multi-platform-cpp/proj.mac/main.cpp b/template/multi-platform-cpp/proj.mac/main.cpp index d8074883bc..061f7b6874 100644 --- a/template/multi-platform-cpp/proj.mac/main.cpp +++ b/template/multi-platform-cpp/proj.mac/main.cpp @@ -30,7 +30,7 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/template/multi-platform-cpp/proj.win32/main.cpp b/template/multi-platform-cpp/proj.win32/main.cpp index c7a804c96a..3e192c981c 100644 --- a/template/multi-platform-cpp/proj.win32/main.cpp +++ b/template/multi-platform-cpp/proj.win32/main.cpp @@ -14,7 +14,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/template/multi-platform-js/proj.win32/main.cpp b/template/multi-platform-js/proj.win32/main.cpp index f15aa09b20..e9fef1d86d 100644 --- a/template/multi-platform-js/proj.win32/main.cpp +++ b/template/multi-platform-js/proj.win32/main.cpp @@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); int ret = Application::getInstance()->run(); diff --git a/template/multi-platform-lua/proj.linux/main.cpp b/template/multi-platform-lua/proj.linux/main.cpp index a2e9b8c38d..fe28f03278 100644 --- a/template/multi-platform-lua/proj.linux/main.cpp +++ b/template/multi-platform-lua/proj.linux/main.cpp @@ -13,7 +13,7 @@ int main(int argc, char **argv) { // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } diff --git a/template/multi-platform-lua/proj.mac/main.cpp b/template/multi-platform-lua/proj.mac/main.cpp index 2d3a9b1eb1..ab23e39856 100644 --- a/template/multi-platform-lua/proj.mac/main.cpp +++ b/template/multi-platform-lua/proj.mac/main.cpp @@ -30,7 +30,7 @@ USING_NS_CC; int main(int argc, char *argv[]) { AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); return Application::getInstance()->run(); } \ No newline at end of file diff --git a/template/multi-platform-lua/proj.win32/main.cpp b/template/multi-platform-lua/proj.win32/main.cpp index 8f302d1f1a..4dfce357f9 100644 --- a/template/multi-platform-lua/proj.win32/main.cpp +++ b/template/multi-platform-lua/proj.win32/main.cpp @@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - EGLView* eglView = new EGLView(); - eglView->init("TestCPP",900,640); + EGLView eglView; + eglView.init("TestCPP",900,640); int ret = Application::getInstance()->run();