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

静态变量析构崩溃 #182

Open
blackStar1314 opened this issue Nov 12, 2024 · 0 comments
Open

静态变量析构崩溃 #182

blackStar1314 opened this issue Nov 12, 2024 · 0 comments

Comments

@blackStar1314
Copy link

blackStar1314 commented Nov 12, 2024

现象:
image
堆栈信息:
image

原因:
该静态变量析构顺序在GdiplusShutdown(gdiplusToken)之后,导致Gdiplus::FontFamily()析构异常。

问题源码:

std::map<std::string, sptr<Font_win32>> Font_win32::_win32Faces;

可行的一种解决思路:
PlatformFactory_gdi 析构中管理这个对象的析构,保证在GdiplusShutdown(gdiplusToken)之前析构Gdiplus::FontFamily()

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

1 participant