Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cocos关闭重启问题 #2870

Open
ljs19850321 opened this issue Oct 5, 2020 · 1 comment
Open

cocos关闭重启问题 #2870

ljs19850321 opened this issue Oct 5, 2020 · 1 comment

Comments

@ljs19850321
Copy link

ljs19850321 commented Oct 5, 2020

cocos关闭和重新开启问题
v2.2.2

问题是:关闭的时候内存可以正常释放, 但是第二次重启的时候会出现黑屏的现象。找了一下原因,是DeviceGraphics这类引起的。我要是强行delete DeviceGraphics 类,黑屏现象没了,但是会有内存溢出的错误。

求助一下 大神们 能不能指导一下
@ PatriceJiang

@ljs19850321 ljs19850321 changed the title DeviceGraphics cocos关闭重启问题 Oct 7, 2020
@neufeng
Copy link

neufeng commented Dec 2, 2020

You need to stop the runloop first.
cocos2d::Application::getInstance()->onPause();
cocos2d::Application::getInstance()->stop();
refer to my post
https://forum.cocos.org/t/cocos2-x/98806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants