mirror of https://github.com/axmolengine/axmol.git
glfw EGLView set alloc on the stack to prevent memory leak
This commit is contained in:
parent
5a65ef7488
commit
a2dee37b0e
|
@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
|
|
||||||
int ret = Application::getInstance()->run();
|
int ret = Application::getInstance()->run();
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,8 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,8 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",960,640);
|
eglView.init("TestCPP",960,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
|
|
||||||
int ret = Application::getInstance()->run();
|
int ret = Application::getInstance()->run();
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
|
|
||||||
int ret = Application::getInstance()->run();
|
int ret = Application::getInstance()->run();
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
|
|
||||||
int ret = Application::getInstance()->run();
|
int ret = Application::getInstance()->run();
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
|
|
||||||
int ret = Application::getInstance()->run();
|
int ret = Application::getInstance()->run();
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
|
|
||||||
int ret = Application::getInstance()->run();
|
int ret = Application::getInstance()->run();
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
|
|
||||||
int ret = Application::getInstance()->run();
|
int ret = Application::getInstance()->run();
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
|
|
||||||
int ret = Application::getInstance()->run();
|
int ret = Application::getInstance()->run();
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
|
|
||||||
int ret = Application::getInstance()->run();
|
int ret = Application::getInstance()->run();
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ USING_NS_CC;
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
return Application::getInstance()->run();
|
return Application::getInstance()->run();
|
||||||
}
|
}
|
|
@ -24,8 +24,8 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
EGLView* eglView = new EGLView();
|
EGLView eglView;
|
||||||
eglView->init("TestCPP",900,640);
|
eglView.init("TestCPP",900,640);
|
||||||
|
|
||||||
int ret = Application::getInstance()->run();
|
int ret = Application::getInstance()->run();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue