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

CPU占用过高,需要优化 #2

Closed
woddle opened this issue Dec 7, 2022 · 3 comments
Closed

CPU占用过高,需要优化 #2

woddle opened this issue Dec 7, 2022 · 3 comments

Comments

@woddle
Copy link

woddle commented Dec 7, 2022

图像查看器程序,在加载了程序后,CPU占用一直在20%,也不会下降

@FSMargoo
Copy link
Owner

FSMargoo commented Dec 7, 2022

能不能提供一下具体的操作,是打开程序后不进行任何操作就一直占用 CPU,还是加载了图片以后占用 CPU?

@woddle
Copy link
Author

woddle commented Dec 7, 2022

1、编译demo里面的PhotoViewerX,然后启动;CPU占用很低
2、随便加载一张图像,此时CPU占用涨到10%以上,并且没有任何操作,一直占用这么高不会下降。

@FSMargoo
Copy link
Owner

FSMargoo commented Dec 7, 2022

问题已经解决了,出现的原因是因为调用了 GetOpenFileName 没有即时释放资源导致一直占用 CPU...

@FSMargoo FSMargoo closed this as completed Dec 7, 2022
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