glfw EGLView set alloc on the stack to prevent memory leak

This commit is contained in:
Huabing.Xu 2013-09-18 17:00:21 +08:00
parent 5a65ef7488
commit a2dee37b0e
32 changed files with 64 additions and 64 deletions

View File

@ -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();

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();